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(){
799799 * //-> false
800800 **/
801801 function include ( pattern ) {
802- return this . indexOf ( pattern ) > - 1 ;
802+ return this . indexOf ( pattern ) !== - 1 ;
803803 }
804804
805805 /**
@@ -945,7 +945,8 @@ Object.extend(String.prototype, (function(){
945945 unfilterJSON : unfilterJSON ,
946946 isJSON : isJSON ,
947947 evalJSON : evalJSON ,
948- include : include ,
948+ //ECMA 6 supports contains(), if it exists map include() to contains()
949+ include : String . prototype . contains || include ,
949950 // Firefox 18+ supports String.prototype.startsWith, String.prototype.endsWith
950951 startsWith : String . prototype . startsWith || startsWith ,
951952 endsWith : String . prototype . endsWith || endsWith ,
You can’t perform that action at this time.
0 commit comments