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

Add extra check to loop.

This commit is contained in:
Neil Jenkins 2012-08-22 13:14:08 +02:00
parent 691058e071
commit 92645f1c0f
2 changed files with 3 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -771,10 +771,9 @@
var start = range.getStartBlock(), var start = range.getStartBlock(),
end = range.getEndBlock(); end = range.getEndBlock();
if ( start && end ) { if ( start && end ) {
while ( true ) { do {
if ( fn( start ) || start === end ) { break; } if ( fn( start ) || start === end ) { break; }
start = start.getNextBlock(); } while ( start = start.getNextBlock() );
}
} }
if ( mutates ) { if ( mutates ) {