Skip to content

Commit

Permalink
Fix last commit re. set-constant scriptlet
Browse files Browse the repository at this point in the history
Related commit:
- 40ea9d69d5d0

Related issue:
- uBlockOrigin/uBlock-issues#947

Restore intended behavior with original commit:
- 14ebfbea279c

The purpose of the original change was to be able to
trap properties which values were `null`.
  • Loading branch information
gorhill committed Mar 16, 2020
1 parent a9688cd commit 85cf8f5
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 @@ -549,7 +549,10 @@
const prop = chain.slice(0, pos);
let v = owner[prop];
chain = chain.slice(pos + 1);
if ( v instanceof Object || typeof v === 'object' ) {
if (
(v instanceof Object) ||
(typeof v === 'object' && v !== null)
) {
makeProxy(v, chain);
return;
}
Expand Down

0 comments on commit 85cf8f5

Please sign in to comment.