fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
smartxml: fix - DocumentNode.getIndex() now handles node being out of document tree
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
60ed6a0
..
6f12667
100644
(file)
--- 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;