From ee6e172559de59c066dcf5964cdc736bb738ebe1 Mon Sep 17 00:00:00 2001 From: htmltiger <1429451+htmltiger@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:27:48 +0100 Subject: [PATCH] check null --- numberbox-card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numberbox-card.js b/numberbox-card.js index 0be50a5..8020a15 100644 --- a/numberbox-card.js +++ b/numberbox-card.js @@ -226,7 +226,7 @@ niceNum(){ let fix=0; let v=this.pending; if( v === false ){ v=this.state; - if(v=='unavailable' || ( v=='unknown' && this.config.initial === undefined ) ){return '?';} + if(v=='unavailable' || v === null || ( v=='unknown' && this.config.initial === undefined ) ){return '?';} v=this.timeNum(v); if(isNaN(v) && this.config.initial !== undefined){ v=Number(this.config.initial);