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

[Bug canary] @tracked with uninitialized property throws runtime error #17764

Closed
chriskrycho opened this issue Mar 18, 2019 · 0 comments
Closed

Comments

@chriskrycho
Copy link
Contributor

chriskrycho commented Mar 18, 2019

If you write a component like this:

import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';

export default class ItBroken extends Component {
  @tracked data;

  get ugh() {
    return this.data;
  }
}
{{this.ugh}}

Then you see this error:

null is not an object (evaluating 'initializer.call')

The problem is here – it should check for both null and undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant