Skip to content

Commit

Permalink
use Boolean() instead of !!
Browse files Browse the repository at this point in the history
  • Loading branch information
JGreenlee committed Feb 12, 2024
1 parent 125d009 commit 2453e9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion www/js/metrics/metricsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function isCustomLabels(modeMap) {
logDebug(`Checking metric keys ${distanceKeys}; sensed ${isSensedKeys}; custom ${isCustomKeys}`);
const isAllCustomForMetric = isAllCustom(isSensedKeys, isCustomKeys);
metricSummaryChecksSensed.push(!isAllCustomForMetric);
metricSummaryChecksCustom.push(!!isAllCustomForMetric);
metricSummaryChecksCustom.push(Boolean(isAllCustomForMetric));
logDebug(`overall custom/not results for each metric
is ${JSON.stringify(metricSummaryChecksCustom)}`);
return isAllCustom(metricSummaryChecksSensed, metricSummaryChecksCustom);
Expand Down
2 changes: 1 addition & 1 deletion www/js/onboarding/onboardingHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function readConsented() {
}

export async function readIntroDone() {
return storageGet(INTRO_DONE_KEY).then((read_val) => !!read_val) as Promise<boolean>;
return storageGet(INTRO_DONE_KEY).then((read_val) => Boolean(read_val)) as Promise<boolean>;
}

export async function markIntroDone() {
Expand Down

0 comments on commit 2453e9a

Please sign in to comment.