Skip to content

Commit

Permalink
Removed unnecessary check on array.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddix committed Oct 19, 2017
1 parent 6200419 commit 46840d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap-maxlength.js
Expand Up @@ -127,7 +127,7 @@
for (
var removedBytes = 0,
bytesPastMax = utf8Length(text) - maxlength
;removedBytes < bytesPastMax && indexedSize.length > 0
;removedBytes < bytesPastMax
;removedBytes += indexedSize.pop()
);
maxlength -= (maxlength - indexedSize.length);
Expand Down

0 comments on commit 46840d6

Please sign in to comment.