WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 6ca8ed6

Browse files
Copilotnetmindz
andcommitted
Address code review feedback: use boolean coercion instead of logical OR
Co-authored-by: netmindz <[email protected]>
1 parent 6a2b799 commit 6ca8ed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wled00/data/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,7 +3471,7 @@ function reportUpgradeEvent(info, oldVersion, alwaysReport) {
34713471
.then(res => {
34723472
if (res.ok) {
34733473
showToast('Thank you for reporting!');
3474-
updateVersionInfo(info.ver, false, alwaysReport || false);
3474+
updateVersionInfo(info.ver, false, !!alwaysReport);
34753475
} else {
34763476
showToast('Report failed. Please try again later.', true);
34773477
// Do NOT update version info on failure - user will be prompted again
@@ -3488,7 +3488,7 @@ function updateVersionInfo(version, neverAsk, alwaysReport) {
34883488
const versionInfo = {
34893489
version: version,
34903490
neverAsk: neverAsk,
3491-
alwaysReport: alwaysReport || false
3491+
alwaysReport: !!alwaysReport
34923492
};
34933493

34943494
// Create a Blob with JSON content and use /upload endpoint

0 commit comments

Comments
 (0)