From b800321fbc93cb33059c10b1465ee69eb22373ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 5 Dec 2023 17:09:19 -0300 Subject: [PATCH] html: watcher: Fix watcher path reference for values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/html/watcher.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html/watcher.html b/src/html/watcher.html index 2e2892f..5712b37 100644 --- a/src/html/watcher.html +++ b/src/html/watcher.html @@ -75,7 +75,7 @@ } jsonData = path.reduce((a, b)=> a[b], jsonData) - if ('header' in jsonData && 'message' in jsonData) { + if (typeof jsonData === 'object' && ('header' in jsonData && 'message' in jsonData)) { this.setMessage(jsonData.message) } else { this.setMessage(jsonData)