Skip to content

Commit 0f7608c

Browse files
committed
rPing: correct property names in sorting logic for ping and http statuses
Signed-off-by: KARTHIK LAL <dev@karthiklal.in>
1 parent 29323a4 commit 0f7608c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

static/failed_logs.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,14 @@
9191
compareB = b.device.toLowerCase();
9292
break;
9393
case 'ping':
94-
compareA = a.pingStatus.toLowerCase();
95-
compareB = b.pingStatus.toLowerCase();
94+
// Fix: Use the property name that matches your data object
95+
compareA = a.ping ? a.ping.toLowerCase() : '';
96+
compareB = b.ping ? b.ping.toLowerCase() : '';
9697
break;
9798
case 'http':
98-
compareA = a.httpStatus.toLowerCase();
99-
compareB = b.httpStatus.toLowerCase();
99+
// Fix: Use the property name that matches your data object
100+
compareA = a.http ? a.http.toLowerCase() : '';
101+
compareB = b.http ? b.http.toLowerCase() : '';
100102
break;
101103
default:
102104
return 0;

0 commit comments

Comments
 (0)