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

Cannot read property 'forEach' of undefined #433

Open
uedaeita opened this issue Oct 15, 2020 · 0 comments
Open

Cannot read property 'forEach' of undefined #433

uedaeita opened this issue Oct 15, 2020 · 0 comments

Comments

@uedaeita
Copy link

uedaeita commented Oct 15, 2020

I have encountered an error Cannot read property 'forEach' of undefined when I have deku.dom.create like the method as follows.

import * as deku from 'deku';

class someClass {
  public generateElement(): HTMLElement {
    let VNode = <div style='width: 100%; height: 100%;'></div>;
    return deku.dom.create(VNode);
  }
}

I found out vnode.children turned out to be undefined in below code in some cases (it does not always happen) for some reason, it would be great if anyone knows there is any way around?
https://github.com/anthonyshort/deku/blob/master/src/dom/create.js#L73

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

No branches or pull requests

1 participant