Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn if value is set in a disposed object #3398

Closed
tsv2013 opened this issue Sep 29, 2021 · 0 comments
Closed

Warn if value is set in a disposed object #3398

tsv2013 opened this issue Sep 29, 2021 · 0 comments
Assignees
Milestone

Comments

@tsv2013
Copy link
Member

tsv2013 commented Sep 29, 2021

protected setPropertyValueCore(propertiesHash: any, name: string, val: any) {
    if (this.setPropertyValueCoreHandler) {
      if (!this.isDisposedValue) {
        this.setPropertyValueCoreHandler(propertiesHash, name, val);
      } else {
        // eslint-disable-next-line no-console
        console.warn("Attempt to set property '%s' of a disposed object %o", name, this);
      }
    }
    else propertiesHash[name] = val;
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants