mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Fix regression in set-constant scriptlet
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/947 `Object.prototype` is not an instance of `Object`, but yet is still a JS object; thus the solution is to additionally compare against `typeof`.
This commit is contained in:
parent
ab6fdf43ed
commit
40ea9d69d5
@ -549,7 +549,7 @@
|
|||||||
const prop = chain.slice(0, pos);
|
const prop = chain.slice(0, pos);
|
||||||
let v = owner[prop];
|
let v = owner[prop];
|
||||||
chain = chain.slice(pos + 1);
|
chain = chain.slice(pos + 1);
|
||||||
if ( v instanceof Object ) {
|
if ( v instanceof Object || typeof v === 'object' ) {
|
||||||
makeProxy(v, chain);
|
makeProxy(v, chain);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user