We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c60e0f commit 49083f7Copy full SHA for 49083f7
ts/structs/CommonBase.mts
@@ -374,7 +374,7 @@ export class CommonBase {
374
// In TypeScript, protected means "any subclass can access parent fields on instances of itself"
375
// To work around this, we add accessors for other instances' protected fields here.
376
protected static add_ref_from(holder: CommonBase, referent: object) {
377
- holder.ptrs_to.push(referent);
+ if (holder !== null) { holder.ptrs_to.push(referent); }
378
}
379
protected static get_ptr_of(o: CommonBase) {
380
return o.ptr;
0 commit comments