fix
[fnpeditor.git] / src / smartxml / smartxml.js
index 6b71026..1686abd 100644 (file)
@@ -9,6 +9,9 @@ var TEXT_NODE = Node.TEXT_NODE;
 
 
 var DocumentNode = function(nativeNode, document) {
+    if(!document) {
+        throw new Error('undefined document for a node');
+    }
     this.document = document;
     this.nativeNode = nativeNode;
     this._$ = $(nativeNode);