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

feat: add isInitialized #150

Merged
merged 2 commits into from Nov 7, 2023
Merged

feat: add isInitialized #150

merged 2 commits into from Nov 7, 2023

Conversation

ghost
Copy link

@ghost ghost commented Feb 25, 2023

This change adds the "isInitialized" function
Now it is impossible to check whether initialization has been performed. This may cause errors when using modules that also use electron/remote.
Current code (so that it does not throw an error if initialization has already been done):

try { remote.initialize(); } catch { }

New code:

if (!remote.isInitialized()) {
     remote.initialize();
}

@ghost ghost requested review from a team as code owners February 25, 2023 23:41
@dsanders11 dsanders11 changed the title add isInitialized feat: add isInitialized Aug 30, 2023
src/main/server.ts Outdated Show resolved Hide resolved
@VerteDinde VerteDinde merged commit c258862 into electron:main Nov 7, 2023
3 checks passed
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants