1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Fix last commit re. set-constant scriptlet

Related commit:
- https://github.com/gorhill/uBlock/commit/40ea9d69d5d0

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/947

Restore intended behavior with original commit:
- https://github.com/gorhill/uBlock/commit/14ebfbea279c

The purpose of the original change was to be able to
trap properties which values were `null`.
This commit is contained in:
Raymond Hill 2020-03-16 09:09:48 -04:00
parent a9688cd670
commit 85cf8f5807
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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;
}