From e1d256ae397d20413915e5135ab2eb22075a5956 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 13 Jan 2024 18:31:00 +0100 Subject: [PATCH] Handle null values correctly --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 19db76d..af01de6 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ This is a generalized solution to the problem of modular plumbing, and should al module.exports = function createVersionedSpecialMatcher({ markerProperty, versionProperty, friendlyName, expectedVersions }) { return function isSpecial(value) { - if (value[markerProperty]) { + if (value != null && value[markerProperty]) { if (expectedVersions.includes(value[versionProperty])) { return true; } else {