Revert if in logic

See f0611a980c
Fixing these broke a lot of behavior
This commit is contained in:
David Reed 2022-11-23 13:11:00 -05:00
parent f905b01477
commit fddd5cd698
No known key found for this signature in database
GPG key ID: 2211691D8A1EE72F
2 changed files with 3 additions and 2 deletions

View file

@ -212,7 +212,8 @@ class ElementApi extends EventEmitter {
);
}
hookProperty(element, prop, handler) {
if (!element || !(prop in element)) return false;
// if (!element || !(prop in element)) return false;
if (!element) return false;
if (this.ctx.nativeMethods.isArray(element)) {
for (const elem of element) {

View file

@ -68,7 +68,7 @@ class UVClient extends EventEmitter {
);
}
override(obj, prop, wrapper, construct) {
if (!(prop in obj)) return false;
// if (!(prop in obj)) return false;
const wrapped = this.wrap(obj, prop, wrapper, construct);
return (obj[prop] = wrapped);
}