Do extra check to be sure ngDevMode is defined #36055
Conversation
|
Also please change the git commit message to: |
|
I know resources are limited, but any chance someone could get the final review done? |
|
Hi @mcalmus, thanks for creating this PR. Could you please perform a couple updates:
Thank you. |
|
Done |
|
Thanks for the update @mcalmus. I looked at the comment and I think it'd be great to expand it to provide more context. It's still a bit unclear why this extra check is needed. I agree that this approach is much safer, but it's not clear what the main reason is and having a detailed comment would help a lot. Feel free to share what the problem was in your use-case and I can help put together a comment that we can add to the code. Thank you. |
|
@AndrewKushnir Here is my comment in the original issue: #31595 (comment) |
|
Clearly I rushed that comment, even with a typo. I guess I should have said "if defined globally elsewhere" or something like that. In any event it has been removed. |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLAs look good, thanks! |
|
Hi @mcalmus, thanks for applying the changes, the code looks good. Could you please squash all commits in 1 commit and rebase this PR on top of the current master? Thank you. |
When reading globals such as `ngDevMode` the read should be guarded by `typeof ngDevMode` otherwise it will throw if not defined in `"use strict"` mode.
When reading globals such as `ngDevMode` the read should be guarded by `typeof ngDevMode` otherwise it will throw if not defined in `"use strict"` mode. PR Close #36055
When reading globals such as `ngDevMode` the read should be guarded by `typeof ngDevMode` otherwise it will throw if not defined in `"use strict"` mode. PR Close #36055
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #31595
What is the new behavior?
Does this PR introduce a breaking change?
Other information
The text was updated successfully, but these errors were encountered: