Skip to content

Commit

Permalink
Minor improvement to set-constant scriptlet
Browse files Browse the repository at this point in the history
Disregard type matching for when the target property
is `null` or is set to `null`.
  • Loading branch information
gorhill committed Jan 21, 2020
1 parent 043ae11 commit c7dc65f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/resources/scriptlets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c7dc65f

Please sign in to comment.