Skip to content

Commit c7dc65f

Browse files
committed
Minor improvement to set-constant scriptlet
Disregard type matching for when the target property is `null` or is set to `null`.
1 parent 043ae11 commit c7dc65f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

assets/resources/scriptlets.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,10 @@
506506
let aborted = false;
507507
const mustAbort = function(v) {
508508
if ( aborted ) { return true; }
509-
aborted = v !== undefined && cValue !== undefined && typeof v !== typeof cValue;
509+
aborted =
510+
(v !== undefined && v !== null) &&
511+
(cValue !== undefined && cValue !== null) &&
512+
(typeof v !== typeof cValue);
510513
return aborted;
511514
};
512515
const makeProxy = function(owner, chain) {

0 commit comments

Comments
 (0)