Skip to content

fix(frontendlib): use logical OR instead of bitwise OR for waitTimeout default#402

Open
salehahmed99 wants to merge 1 commit intoneutralinojs:mainfrom
salehahmed99:fix/bitwise-or-bug
Open

fix(frontendlib): use logical OR instead of bitwise OR for waitTimeout default#402
salehahmed99 wants to merge 1 commit intoneutralinojs:mainfrom
salehahmed99:fix/bitwise-or-bug

Conversation

@salehahmed99
Copy link
Copy Markdown

Description

This PR replaces a bitwise OR operator (|) with a logical OR operator (||) in src/modules/frontendlib.js.

The original use of the bitwise operator caused incorrect timeout calculations when a custom waitTimeout was provided in neutralino.config.json because it performed bit-masking instead of a logical fallback. For example, a configured value of 5000 resulted in an actual timeout of 24488ms (5000 | 20000).

Fixes #401

Changes

  • Updated the timeout variable assignment to use || for proper fallback logic.
let timeout = (configObj.cli && configObj.cli.frontendLibrary && configObj.cli.frontendLibrary.waitTimeout) || 20000;

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.

Bug: Incorrect bitwise OR operator used for waitTimeout in frontendlib.js

1 participant