diff --git a/src/common.js b/src/common.js index c7f853c99..a677d7fbb 100644 --- a/src/common.js +++ b/src/common.js @@ -174,7 +174,7 @@ function omit(obj) { var copy = {}; var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1)); for (var key in obj) { - if (keys.indexOf(key) == -1) copy[key] = obj[key]; + if (indexOf(keys, key) == -1) copy[key] = obj[key]; } return copy; } diff --git a/src/urlMatcherFactory.js b/src/urlMatcherFactory.js index ec9d4023d..cea6ffb63 100644 --- a/src/urlMatcherFactory.js +++ b/src/urlMatcherFactory.js @@ -520,7 +520,7 @@ Type.prototype.$asArray = function(mode, isSearch) { val = arrayWrap(val); var result = map(val, callback); if (allTruthyMode === true) - return result.filter(falsey).length === 0; + return filter(result, falsey).length === 0; return arrayUnwrap(result); }; }