Closed GeorgeGkas closed 6 years ago
This is unrelated to stamps, it's a basic behavior of JS engine. You are causing infinite loop there. By setting a value to this.parent
it calls set
which again sets this.parent
and then it loops till stack is full. I believe you should avoid defining that setter there, it's an implicit behavior to set the value of that property. Otherwise, you would need to add a check there for equality and not to set a value that's already there to break the loop.
Oh yes just find out what cause it. I came to close this issue, but you already replied. Thank you that took time to answer my question. :)
Frankly speaking this issue freaked me out. :) You know, when you spend days testing the code adding hundreds of unit tests (I even moved the unit tests to its own module), and then someone finds a bug...
Much relief having you finding the cause! :) Thanks @FredyC ! Spot on 👍
I post a potential bug.
Package: @stamp/it Version: 1.0.3 Node: v10.5.0 Description: When try to set a property value using
set
property Descriptor the following error occurs:RangeError: Maximum call stack size exceeded
.Example:
The
RangeError
is thrown whenever try to assign a value inparent
property, not just oninit()
.Test case: