0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Fix bug in hasFormat

Must see at least one text node with format to return true.
This commit is contained in:
Neil Jenkins 2011-11-17 18:32:11 +11:00
parent f1a714a179
commit 09308b729b

View file

@ -413,13 +413,15 @@
FILTER_ACCEPT : FILTER_SKIP;
}, false );
var seenNode = false;
while ( node = walker.nextNode() ) {
if ( !node.nearest( tag, attributes ) ) {
return false;
}
seenNode = true;
}
return true;
return seenNode;
};
var addFormat = function ( tag, attributes, range ) {