From c7dc65fe33ed58ff2bad10ce4a8848b97c8591ce Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 21 Jan 2020 10:57:55 -0500 Subject: [PATCH] Minor improvement to set-constant scriptlet Disregard type matching for when the target property is `null` or is set to `null`. --- assets/resources/scriptlets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index e75da6e66..ef93a6016 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -506,7 +506,10 @@ let aborted = false; const mustAbort = function(v) { if ( aborted ) { return true; } - aborted = v !== undefined && cValue !== undefined && typeof v !== typeof cValue; + aborted = + (v !== undefined && v !== null) && + (cValue !== undefined && cValue !== null) && + (typeof v !== typeof cValue); return aborted; }; const makeProxy = function(owner, chain) {