Closed epinapala closed 5 years ago
In almost all cases, this is due to the original HTML element associated with a Marko Widget being removed from the DOM without the widget being properly being destroyed (using myWidget.destroy()
). When the DOM node associated with a widget is removed then that results in document.getElementById(widgetId)
to return null. The error should probably be better messaged by Marko Widgets, but I don't believe this is a morphdom
issue. Please investigate how you are managing the DOM to ensure that you are not incorrectly destroying a widget. Let me know if you are still stuck.
Closing for now! Feel free to reach out!
We have a setup where we are running tests on marko widgets, and are seeing the issue below :
PhantomJS 1.9.8 (Mac OS X 0.0.0) TypeError: 'null' is not an object (evaluating 'morphedNode.nodeType') (/path/to/project/.test/lasso/static/node_modules/marko-widgets/node_modules/morphdom/lib/index.js:373)
In addition to this we are also seeing:
ERROR: '(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.', 11
Causing all the tests the fail.