Minor improvement to set-constant scriptlet

Disregard type matching for when the target property
is `null` or is set to `null`.
This commit is contained in:
Raymond Hill 2020-01-21 10:57:55 -05:00
parent 043ae117c8
commit c7dc65fe33
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 1 deletions

View File

@ -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) {