Check for equivalence with previous render's value doesn't respect optional-chaining / null coalescing of uncompiled code #68
Replies: 2 comments 1 reply
-
@dfoley112 a couple of things:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
version: "19.1.0-rc.2" policy is requested asynchronously from a db and therefore is undefined on initial render |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
An expression such as:
is compiled to:
Note the initial check for equivalence is not optionally chained like the uncompiled code. This causes a null reference exception whereas the original (uncompiled) code does not. Should the compiler be making meaningful changes to the uncompiled code like this - i.e. making assumptions which the uncompiled code did not?
For reference, re-expressing the original statement as this works:
Beta Was this translation helpful? Give feedback.
All reactions