fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: removing unused code
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.js
diff --git
a/src/smartxml/smartxml.js
b/src/smartxml/smartxml.js
index
1e3ae44
..
a5a1abc
100644
(file)
--- 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;
getNodeByPath: function(path) {
var toret = this.root;
- path.
forEach
(function(idx) {
+ path.
some
(function(idx) {
toret = toret.contents()[idx];
toret = toret.contents()[idx];
+ if(!toret) {
+ return true;
+ }
});
return toret;
},
});
return toret;
},