fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wlxml: Document's root is always a context root
[fnpeditor.git]
/
src
/
wlxml
/
wlxml.js
diff --git
a/src/wlxml/wlxml.js
b/src/wlxml/wlxml.js
index
df93b3e
..
262004c
100644
(file)
--- a/
src/wlxml/wlxml.js
+++ b/
src/wlxml/wlxml.js
@@
-33,6
+33,9
@@
var WLXMLDocumentNodeMethods = {
isContextRoot: function() {
var me = this.nodeType === Node.ELEMENT_NODE ? [this] : [],
toret = false;
isContextRoot: function() {
var me = this.nodeType === Node.ELEMENT_NODE ? [this] : [],
toret = false;
+ if(!this.parent()) {
+ return true;
+ }
me.concat(this.parents()).some(function(node) {
if(_.isFunction(node.object.isContextRoot) && node.object.isContextRoot(this)) {
toret = true;
me.concat(this.parents()).some(function(node) {
if(_.isFunction(node.object.isContextRoot) && node.object.isContextRoot(this)) {
toret = true;