Skip to content
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

m-for shows error when array is updated #126

Closed
AndresSepar opened this issue Sep 5, 2017 · 4 comments
Closed

m-for shows error when array is updated #126

AndresSepar opened this issue Sep 5, 2017 · 4 comments
Assignees
Labels

Comments

@AndresSepar
Copy link

The error is:

moon.js:333 Uncaught TypeError: Cannot read property '__moon__' of undefined
at removeChild (moon.js:333)
at diff (moon.js:871)
at diff (moon.js:883)
at Moon.patch (moon.js:1905)
at Moon.build (moon.js:1944)
at moon.js:164

Because moon/src/util/vdom.js is passing ...meta.el as undefined:


moon/src/util/dom.js

Line:105  let componentInstance = node.__moon__;

moon/src/util/vdom.js

Line:501  removeChild(oldChildren.pop().meta.el, node);
Line:513  diff(oldChild, child, i$1, node, oldVNode);

moon/src/instance/methods.js

Line:219  diff(old, vnode, 0, parent, {});
Line:258  this.patch(old, dom, this.root.parentNode);

moon/src/util/util.js

Line:42 instance.build();
@kbrsh
Copy link
Owner

kbrsh commented Sep 5, 2017

Odd. Can you provide a reproduction jsFiddle or something similar?

@AndresSepar
Copy link
Author

@kbrsh
Copy link
Owner

kbrsh commented Sep 5, 2017

Thank you! A reproduction always helps me experiment around with the issue. This happened because of a change in a metadata property of a virtual DOM node.

@kbrsh kbrsh self-assigned this Sep 5, 2017
@kbrsh kbrsh added the bug label Sep 5, 2017
@kbrsh kbrsh closed this as completed in 010a11b Sep 5, 2017
@AndresSepar
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants