Question

I have an error I'm getting when I run my JavaScript tests in browser using QUnit and Chutzpah. The error I'm getting is "Uncaught TypeError: Cannot read property 'nodeType' of null knockout-2.2.1.js:12" has anyone experienced this error before using QUnit and Knockout? I don't get the error when I run my application so I'm a little lost as to why it is showing up now.

Thanks!

Était-ce utile?

La solution

This error usually happens when ko.applyBindings is called in the head of your page, as the body is not set yet. Make sure that ko.applyBindings is called at the bottom of the page or in a ready block.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top