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

tab-manager: Promise returned in function argument where a void return was expected. #350

Closed
manusa opened this issue Oct 12, 2023 · 0 comments · Fixed by #357
Closed

tab-manager: Promise returned in function argument where a void return was expected. #350

manusa opened this issue Oct 12, 2023 · 0 comments · Fixed by #357
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed
Milestone

Comments

@manusa
Copy link
Owner

manusa commented Oct 12, 2023

Description

The following code has been marked as a bug:

const registerIdInTab = () => tab.webContents.executeJavaScript(`window.tabId = '${id}';`);
tab.webContents.on('dom-ready', registerIdInTab);
registerIdInTab().then();

It should be changed to:

    const registerIdInTab = () => {
      tab.webContents.executeJavaScript(`window.tabId = '${id}';`).then();
    };
    tab.webContents.on('dom-ready', registerIdInTab);
    registerIdInTab();
@manusa manusa added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Hacktoberfest labels Oct 12, 2023
@manusa manusa added this to the 0.1.0 milestone Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@manusa and others