-
Notifications
You must be signed in to change notification settings - Fork 4
#45: Configurator error on destroy #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can you post the sequence of SDK method calls that leads to this error? The reason I'm asking is that:
|
I believe this in the storybook is the extreme, since it is not supposed to destroy and initiate components this way in normal applications. The problems in the configurator consist of several methods, for example the ripe-sdk/src/js/visual/configurator-prc.js Line 1313 in b2fe273
It would result in an error like:
Another example is the
It also happened once in the image ripe-sdk/src/js/visual/image.js Line 408 in b2fe273
|
@BeeMargarida please check:
My whole question about this: is this reproducible if you use the SDK correctly by only destroying the HTML element after unbind has completed? |
@gcandal So, I found a simpler and more "scoped" solution. There are 3 major problems:
Image showcasing the destroyed and created calls and the error:
Almost forgot, this whole problem might be reproducible if the is some conditional rendering in the utilization of these components, where a toggle in a button might change from one to another. It might be a very specific situation though, not sure if it would be common. Regarding unit testing, the errors only appear in the console but do not hinder the utilization of the components or the initialization of other components. I think it would be possible to destroy the component and see if the configurator method Regarding awaiting for the |
DOM element
not existing anymore and the components would try to access them, resulting in errors. The solution was returning the functions if theelement
was not defined.