Closed giovannipiller closed 6 years ago
It also appears to be related to the fact that it's called in onrender
. It works fine in oninit
and outside too.
With all the lifecycle hooks, it's also not very easy to know which one "should" be used in what situation.
When travis finishes travising, decorators that try to init with an unrendered host element will just bail instead of possibly dying on edge and v0.10-dev. Thanks for the report!
Thanks Chris! :)
Would it be possible to back-port it to 0.9.x? (I'm going to manually include the fix for now, but it could be useful to others too)
It also appears to be related to the fact that it's called in onrender. It works fine in oninit and outside too
Yup. For context: in our app, this happened during the re-computation of a computed property, among other things.
Description:
Removing an element (with a decorator) on component's render, triggers a JS error.
Error is in
Decorator.js
's render functionthis.models
is null.Versions affected:
Interestingly, 0.8.x doesn't seem to be affected.
Platforms affected:
Tested on Chrome & Safari.
Reproduction:
JSFiddle.
Interestingly, applying a decorator without any argument whatsoever, will not thrown an error: