diff --git a/runtime/pointers.ts b/runtime/pointers.ts index eccfc326..660b56a4 100644 --- a/runtime/pointers.ts +++ b/runtime/pointers.ts @@ -129,7 +129,7 @@ export abstract class Ref extends EventTarget { if (!pointer) throw new Error("Nested pointer properties are currently not supported"); } - if (!(this instanceof Pointer)) throw new Error("Cannot use $, not a pointer"); + if (!(pointer instanceof Pointer)) throw new Error("Cannot use $, not a pointer"); handler.ownKeys = () => { return Reflect.ownKeys(pointer.val);