question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'childNodes' of undefined

See original GitHub issue

When attempting to create a List with no initial <li> elements in the DOM, List.js fails at this line.

Here is a small example (using jQuery):

$(function () {
    var options = {valueNames: ["name"]};
    var list = new List("list", options);

    $("#add-item").click(function () {
      list.add({name:"John"});
    });
});

Adding [] for the values argument of List’s constructor doesn’t help.

Reproduced on: Chrome 14.0.835.202 Safari 5.1.1 (7534.51.22)

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
brod-iecommented, Aug 25, 2013

Been using this plugin for 5 minutes and have already run into this catastrophic bug. 👎

9reactions
javvecommented, Sep 23, 2013

@hughrawlinson @ryanbrodie @jefffriesen <ul id="exampleListUL"> should be <ul class="list">

@mynameistechno I know that it’s been long time since last big update but I’m currently working hard with v1.0.0 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type error : Cannot read property 'childNodes' of undefined
I had the same problem and I managed to resolve it by wrapping the modal open function inside a $timeout() or a normal...
Read more >
TypeError: Cannot Read Property "childNodes" Of Undefined ...
Ben Nadel demonstrates what may be causing a "TypeError: Cannot Read Property 'childNodes' Of Undefined" in your AngularJS application.
Read more >
Uncaught typeerror: cannot read property 'childnodes' of null
For some reasons, a variable that you expect to be an object have failed to initialize and is set to Null instead. Thud...
Read more >
Cannot read property childNodes of undefined, with extension ...
This error usually happens when some external JavaScript modifies DOM owned by Elm. I think this is a general problem for VirtualDOM-based rendering...
Read more >
Cannot read property 'childNodes' of undefined • Acumatica ...
Hi,. Do you know why a perfectly working GI goes bad? One day it works, the next day, when you go to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found