Skip to content

Commit

Permalink
add trap for ownKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasstrehle committed Jul 17, 2024
1 parent c11c4e5 commit 43a8742
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runtime/pointers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3887,7 +3887,12 @@ export class Pointer<T = any> extends Ref<T> {
if (is_array && Number(prop)+1==obj.length) Runtime.runtime_actions.trimArray(obj)

return true
}
},
ownKeys: (target) => {
// assume that the whole object should be observed for transform
this.handleBeforeNonReferencableGet();
return Reflect.ownKeys(target);
},
});

// set right 'this' context for getters / setters
Expand Down

0 comments on commit 43a8742

Please sign in to comment.