Uncaught TypeError: Cannot read property 'appendChild' of null
bdmac opened this issue · 5 comments
We are using the ember-plupload plugin and have noticed that when quickly switching between routes that have components rendering {{plupload}}
we get an error originating in moxie.js L#2387.
It attempts to call container.appendChild(shimContainer)
on that line and generates a "Uncaught TypeError: Cannot read property 'appendChild' of null" error.
My best guess is it has something to do with Ember component lifecycle events and the component (container?) being destroyed before plupload gets to this line.
Sounds about right.
Is there a way to preempt this behavior to prevent the error on our side?
Ugh. Probably the solution is sprinkle in checks for if (this.isDestroyed)
in the component hooks
+1
Ugh. Probably correct. A PR is welcome