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

🚑️ hotfix(electron): fix cordova ReferenceError in electron #1238

Merged
merged 3 commits into from
Apr 1, 2022

Conversation

jyyi1
Copy link
Contributor

@jyyi1 jyyi1 commented Apr 1, 2022

In this PR, I fixed an issue found during the v1.7.0 release: Uncaught ReferenceError: cordova is not defined. This is because we are referencing a non-exist global variable in cordova?.platformId ?? 'Electron'. We can use a global or windows prefix like global.cordova?.platformId, but that might not work well either in electron or browser. Therefore, I chose to use a more traditional way of determining whether a global variable exists: typeof cordova === 'undefined'.

BTW, I also fixed the start action script, it was passing the wrong arguments to build action.

@jyyi1 jyyi1 temporarily deployed to Client iOS Debug April 1, 2022 02:24 Inactive
@jyyi1 jyyi1 temporarily deployed to Client iOS Debug April 1, 2022 02:29 Inactive
@jyyi1 jyyi1 marked this pull request as ready for review April 1, 2022 02:31
@jyyi1 jyyi1 requested a review from a team as a code owner April 1, 2022 02:31
@jyyi1 jyyi1 self-assigned this Apr 1, 2022
@jyyi1 jyyi1 requested review from daniellacosse and fortuna April 1, 2022 02:31
@jyyi1 jyyi1 changed the title 🚑️ fix(electron): fix cordova ReferenceError in electron 🚑️ hotfix(electron): fix cordova ReferenceError in electron Apr 1, 2022
@jyyi1 jyyi1 merged commit b967567 into master Apr 1, 2022
@jyyi1 jyyi1 deleted the junyi/fix-cordova-error-in-electron branch April 1, 2022 18:04
jyyi1 added a commit that referenced this pull request Apr 18, 2022
… fix (#1263)

We fixed [a critical issue related to electron and cordova](#1238) several days ago. Although we did not observe any serious outcomes for Windows app, it is still possible that there might be some issues hidden below.

Therefore, here I will release a new version 1.7.1 for Windows.
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

Successfully merging this pull request may close these issues.

2 participants