diff --git a/packages/contracts/src.ts/index.ts b/packages/contracts/src.ts/index.ts index a13388e2f5..6a5c3d949b 100644 --- a/packages/contracts/src.ts/index.ts +++ b/packages/contracts/src.ts/index.ts @@ -741,9 +741,12 @@ export class Contract { const signature = signatures[0]; - if (this[name] == null) { - defineReadOnly(this, name, this[signature]); - } + // If overwriting a member property that is null, swallow the error + try { + if (this[name] == null) { + defineReadOnly(this, name, this[signature]); + } + } catch (e) { } if (this.functions[name] == null) { defineReadOnly(this.functions, name, this.functions[signature]);