You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking on the node causes the following error: Uncaught TypeError: Cannot read property 'parentNode' of null in the while statement of the function defined in famous-framework.development.bundle.js:
Dispatcher.prototype.emit = function(key, message) {
var element = this.domNode;
var event = new CustomEvent(key, {
detail: message,
bubbles: true
});
if (Dispatcher.willEventsBubbleInDetachedDOM) {
element.dispatchEvent(event);
}
else {
while (element.parentNode) {
element.dispatchEvent(event);
element = element.parentNode;
}
}
};
The text was updated successfully, but these errors were encountered:
ildar-samit
changed the title
'$if' causes an error when used with two components
'$if' causes an error when triggered by a state change from another component
Jul 1, 2015
Fixed with cc0ce9c. This commit refactors the Dispatcher.emit method to record all the ancestors before dispatching events. This change prevents a race condition in which an element is removed from the detached DOM midway through moving up the ancestor chain.
When you get a chance, could you please double check that this update resolved the issue you encountered?
This doesn't happen when all the code is in one component. Only when I have two components like this:
The other component emits an event (and the previous component above listens to it).
Clicking on the node causes the following error:
Uncaught TypeError: Cannot read property 'parentNode' of null
in thewhile
statement of the function defined in famous-framework.development.bundle.js:The text was updated successfully, but these errors were encountered: