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:
parent
f1a714a179
commit
09308b729b
1 changed files with 3 additions and 1 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue