Minor patching

This commit is contained in:
abalabahaha
2016-02-02 05:59:55 -08:00
parent b7c1b6ebe6
commit 9173ded903
4 changed files with 8 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ var Cache = (function (_Array) {
key = null;
} else if (key === this[discrimS] && typeof value === "string") {
return this[discrimCacheS][value] || null;
} else if (value.constructor.name === 'RegExp') {
} else if (value && value.constructor.name === 'RegExp') {
var valid = function valid(item) {
return value.test(item);
};
@@ -68,7 +68,7 @@ var Cache = (function (_Array) {
if (typeof key === 'function') {
var valid = key;
key = null;
} else if (value.constructor.name === 'RegExp') {
} else if (value && value.constructor.name === 'RegExp') {
var valid = function valid(item) {
return value.test(item);
};