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!

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top