X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4dc1ebae49699f3be2dfd6d1f0f41e4bac99660b..215fc305d1a0d964f0b90f67438aecb333c8cd76:/src/smartxml/smartxml.js?ds=inline diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index 1e3ae44..a5a1abc 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -665,8 +665,11 @@ $.extend(Document.prototype, Backbone.Events, fragments, { getNodeByPath: function(path) { var toret = this.root; - path.forEach(function(idx) { + path.some(function(idx) { toret = toret.contents()[idx]; + if(!toret) { + return true; + } }); return toret; },