X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4ebb1730539288b8198f6db38b0ac9d56b0e521d..d3bd4d6524e46d6732f758b2854afeff1c890b2a:/src/smartxml/smartxml.js diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 60ed6a0..6f12667 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -48,6 +48,10 @@ $.extend(DocumentNode.prototype, { }, getPath: function(ancestor) { + if(!(this.document.containsNode(this))) { + return null; + } + var nodePath = [this].concat(this.parents()), toret, idx; ancestor = ancestor || this.document.root;