File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -799,7 +799,7 @@ Object.extend(String.prototype, (function(){
799
799
* //-> false
800
800
**/
801
801
function include ( pattern ) {
802
- return this . indexOf ( pattern ) > - 1 ;
802
+ return this . indexOf ( pattern ) !== - 1 ;
803
803
}
804
804
805
805
/**
@@ -945,7 +945,8 @@ Object.extend(String.prototype, (function(){
945
945
unfilterJSON : unfilterJSON ,
946
946
isJSON : isJSON ,
947
947
evalJSON : evalJSON ,
948
- include : include ,
948
+ //ECMA 6 supports contains(), if it exists map include() to contains()
949
+ include : String . prototype . contains || include ,
949
950
// Firefox 18+ supports String.prototype.startsWith, String.prototype.endsWith
950
951
startsWith : String . prototype . startsWith || startsWith ,
951
952
endsWith : String . prototype . endsWith || endsWith ,
You can’t perform that action at this time.
0 commit comments