Skip to content

Commit

Permalink
Make check for websocket_available strict on null
Browse files Browse the repository at this point in the history
  • Loading branch information
Gared committed Jun 23, 2024
1 parent 0851e95 commit 7a26b86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/instances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const Instances = () => {
</CardHeader>
<CardContent>
<ul className="list-disc ml-5">
{ instance?.scan.websocket_available && <li>Websocket supported: {instance?.scan.websocket_available ? <span>Yes</span> : <span className="text-red-700">No</span>}</li> }
{ instance?.scan.websocket_available !== null && <li>Websocket supported: {instance?.scan.websocket_available ? <span>Yes</span> : <span className="text-red-700">No</span>}</li> }
<li>DB failures: {dbFailures}</li>
</ul>
</CardContent>
Expand Down
2 changes: 1 addition & 1 deletion src/types/InstancesResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ScanResult = {
version: string,
scan_time: string,
plugins: string[],
websocket_available: boolean,
websocket_available: boolean | null,
db_reads_failed: number,
db_writes_failed: number,
}

0 comments on commit 7a26b86

Please sign in to comment.