Skip to content

Commit

Permalink
Fix hasRecoveryDevice (#604)
Browse files Browse the repository at this point in the history
The name was wrong; it did the exact opposite of what the name
suggested.
  • Loading branch information
nmattia authored Mar 25, 2022
1 parent b687ad2 commit 8b2cb9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/src/flows/manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const pageContent = (userNumber: bigint, devices: DeviceData[]) => html`
<p>
You can view and manage this Identity Anchor and its added devices here.
</p>
${hasRecoveryDevice(devices) ? recoveryNag() : undefined}
${!hasRecoveryDevice(devices) ? recoveryNag() : undefined}
<label>Identity Anchor</label>
<div class="highlightBox">${userNumber}</div>
<div class="labelWithAction">
Expand All @@ -162,7 +162,7 @@ const pageContent = (userNumber: bigint, devices: DeviceData[]) => html`
</button>
</div>
<div id="deviceList"></div>
${hasRecoveryDevice(devices)
${!hasRecoveryDevice(devices)
? undefined
: html`
<div class="labelWithAction">
Expand Down Expand Up @@ -361,7 +361,7 @@ const bindRemoveListener = (

// Whether or the user has registered a device as recovery
const hasRecoveryDevice = (devices: DeviceData[]): boolean =>
!devices.some((device) => hasOwnProperty(device.purpose, "recovery"));
devices.some((device) => hasOwnProperty(device.purpose, "recovery"));

const unknownError = (): Error => {
return new Error("Unknown error");
Expand Down

0 comments on commit 8b2cb9c

Please sign in to comment.