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

[Discussion] Figure out if PropertyAccessExpressions on undefined properties inside expressions should throw like they do now #12

Open
wessberg opened this issue Jul 9, 2018 · 0 comments

Comments

@wessberg
Copy link
Member

wessberg commented Jul 9, 2018

Currently users have to continuously type foo == null ? "" : foo.bar to handle conditional existence of props.

Looking for inspiration, Angular tackles this with the Elvis operator: foo?.bar.

@wessberg wessberg changed the title Don't evaluate property access expressions with conditional properties before they are declared [Discussion] Figure out if PropertyAccessExpressions on undefined properties inside expressions Don't evaluate property access expressions should throw like they do now Jul 11, 2018
@wessberg wessberg changed the title [Discussion] Figure out if PropertyAccessExpressions on undefined properties inside expressions Don't evaluate property access expressions should throw like they do now [Discussion] Figure out if PropertyAccessExpressions on undefined properties inside expressions should throw like they do now Jul 11, 2018
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