Skip to content

Fix crash if app is undefined #2894

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 15, 2025
Merged

Fix crash if app is undefined #2894

merged 1 commit into from
Mar 15, 2025

Conversation

crimx
Copy link
Contributor

@crimx crimx commented Mar 12, 2025

Safely check existent of app

@phoneticallySAARTHaK
Copy link
Contributor

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

@crimx
Copy link
Contributor Author

crimx commented Mar 12, 2025

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

Not app has undefined value. app is not defined. Referencing an undefined(not defined) throws an Uncaught ReferenceError: app is not defined error.

@Gerrit0 Gerrit0 merged commit 5eaa109 into TypeStrong:master Mar 15, 2025
8 checks passed
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 15, 2025

Thanks!

@phoneticallySAARTHaK
Copy link
Contributor

undefined is a falsy value, so it wouldn't execute the true branch (app.showPage())

Not app has undefined value. app is not defined. Referencing an undefined(not defined) throws an Uncaught ReferenceError: app is not defined error.

I learn more of JS everyday

@zaysayd
Copy link

zaysayd commented Mar 15, 2025 via email

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

Successfully merging this pull request may close these issues.

4 participants