Skip to content

Commit 1041b15

Browse files
committed
use enum for health
1 parent 5b8692d commit 1041b15

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@
795795
import {
796796
createLightNode,
797797
ReliableChannelEvent,
798-
ReliableChannel
798+
ReliableChannel,
799+
HealthStatus
799800
} from 'https://unpkg.com/@waku/[email protected]/bundle/index.js';
800801

801802
// Define protobuf schema
@@ -1387,11 +1388,11 @@
13871388
// Use provided health status or get current health status
13881389
const status = healthStatus || this.node?.health || 'Unhealthy';
13891390

1390-
if (status === 'SufficientlyHealthy') {
1391+
if (status === HealthStatus.SufficientlyHealthy) {
13911392
this.updateStatus('Connected', 'connected');
13921393
this.messageInput.disabled = false;
13931394
this.sendButton.disabled = false;
1394-
} else if (status === 'MinimallyHealthy') {
1395+
} else if (status === HealthStatus.MinimallyHealthy) {
13951396
this.updateStatus('Connected-ish', 'connecting');
13961397
this.messageInput.disabled = false;
13971398
this.sendButton.disabled = false;

0 commit comments

Comments
 (0)