diff --git a/package.json b/package.json index f48695e..bfcf1c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.26.12", + "version": "0.26.13", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/search.ts b/src/search.ts index 63312a2..37116df 100644 --- a/src/search.ts +++ b/src/search.ts @@ -39,8 +39,8 @@ export function logicTest(target: object, condition: string): boolean { case '=': case '==': return a == b; case '!=': return a != b; - case '+': return a.toString().includes(b); - case '-': return !a.toString().includes(b); + case '+': return a?.toString().includes(b); + case '-': return !a?.toString().includes(b); case '>': return a > b; case '>=': return a >= b; case '<': return a < b;