Contains is explicitly false if actual is undefined or null

Fix #627
This commit is contained in:
slackersoft
2014-07-18 13:18:22 -07:00
parent 62212bbfa4
commit a1c109ea17
2 changed files with 9 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ getJasmineRequireObj().matchersUtil = function(j$) {
}
return false;
}
return haystack.indexOf(needle) >= 0;
return !!haystack && haystack.indexOf(needle) >= 0;
},
buildFailureMessage: function() {