Browse files

Fixed a bug in innerTrim

  • Loading branch information...
1 parent 74a9654 commit 3318b2dff3eba7b13c032fb7cb65b2fe5c0b54e7 @Sembiance committed Jul 14, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 String.js
View
2 String.js
@@ -88,7 +88,7 @@ if(!String.prototype.innerTrim)
{
var text = this;
var re = new RegExp(/\s\s/g);
- while(re.test(text))
+ while(text.search(re)!==-1)
{
text = text.replace(re, " ");
}

0 comments on commit 3318b2d

Please sign in to comment.