javve/list — Issue #9: Cannot read property 'childNodes' of undefined
Author: hkukreja
Created: 2011-10-25 22:06:14+00:00
State: open

When attempting to create a List with no initial `
` elements in the DOM, List.js fails at [this line](https://github.com/javve/list/blob/49b08872f0cc9a620b277ef28d70c6ac84d642e7/src/list.js#L82).

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)