Skip to content

Commit

Permalink
Merge pull request #73 from unyt-org/fix-pp-capture
Browse files Browse the repository at this point in the history
Fix pointer property capture
  • Loading branch information
benStre authored Feb 1, 2024
2 parents f592092 + 2f97fd0 commit 9543d5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/pointers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,9 +622,10 @@ export class PointerProperty<T=any> extends Ref<T> {

// get current pointer property
public override get val():T {
// this.handleBeforePrimitiveValueGet();
if (this.lazy_pointer) return undefined as T


// capture property access in parent pointer
this.pointer!.handleBeforeNonReferencableGet(this.key);
const val = this.pointer!.getProperty(this.key, this.#leak_js_properties);

if (val === NOT_EXISTING) {
Expand Down

0 comments on commit 9543d5d

Please sign in to comment.