From a0ad6ec3f1761383d619760351e08ebc67e2e0be Mon Sep 17 00:00:00 2001 From: Zaid Humaimidi Date: Mon, 28 Aug 2023 18:16:40 -0700 Subject: [PATCH] Fix crash with certain validator expressions --- lib/common/authorizer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/authorizer.ts b/lib/common/authorizer.ts index 3bb7eab..afc6d7e 100644 --- a/lib/common/authorizer.ts +++ b/lib/common/authorizer.ts @@ -119,7 +119,7 @@ export default class Authorizer { value = object[entry]; for (const seg of paramName.split(".")) { // typeof null is "object" - if (value != null && typeof value !== "object") value = null; + if (value !== null && typeof value !== "object") value = null; else value = value[seg]; if (value == null) break; }