Reputation: 160
Or am I missing something? Or has this already been addressed in their documentation
Upvotes: 1
Views: 51
Reputation: 317362
Yes, a change to a document that triggered the function could cause an infinite loop. This is noted in the documentation, which you will find as you scroll through it. It says:
Note: Any time you write to the same document that triggered a function, you are at risk of creating an infinite loop. Use caution and ensure that you safely exit the function when no change is needed.
Essentially what it's saying is it's the programmer's responsibility to detect this situation and bail out of the function early, given that the work was already done in a previous invocation.
Upvotes: 2