parent
f905b01477
commit
fddd5cd698
2 changed files with 3 additions and 2 deletions
|
|
@ -212,7 +212,8 @@ class ElementApi extends EventEmitter {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
hookProperty(element, prop, handler) {
|
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)) {
|
if (this.ctx.nativeMethods.isArray(element)) {
|
||||||
for (const elem of element) {
|
for (const elem of element) {
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class UVClient extends EventEmitter {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
override(obj, prop, wrapper, construct) {
|
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);
|
const wrapped = this.wrap(obj, prop, wrapper, construct);
|
||||||
return (obj[prop] = wrapped);
|
return (obj[prop] = wrapped);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue