From 619a4601da449c8dfe08f32cd73853463b070aeb Mon Sep 17 00:00:00 2001 From: htmltiger <1429451+htmltiger@users.noreply.github.com> Date: Sun, 13 Mar 2022 17:27:32 +0000 Subject: [PATCH] minor fix for ALL filetype --- config-editor-card.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config-editor-card.js b/config-editor-card.js index 3b21cd0..6f40b14 100644 --- a/config-editor-card.js +++ b/config-editor-card.js @@ -1,4 +1,4 @@ -console.info("Config Editor 4.1"); +console.info("Config Editor 4.2"); const LitElement = window.LitElement || Object.getPrototypeOf(customElements.get("hui-masonry-view") ); const html = LitElement.prototype.html; const css = LitElement.prototype.css; @@ -77,7 +77,7 @@ render(){ this.edit.ext = this.localGet('Ext')||'yaml'; this.edit.basic = this.localGet('Basic')||''; if(this.fileList = JSON.parse(this.localGet('List'+this.edit.ext))){ - if(this.openedFile.endsWith("."+this.edit.ext)){ + if(this.extOk(this.openedFile)){ setTimeout(this.oldText, 500, this); } }else{this.List();} @@ -239,7 +239,7 @@ async List(){ this.infoLine = e.msg; this.fileList = e.file.slice().sort(); this.saveList(); - if(this.openedFile.endsWith("."+this.edit.ext)){ + if(this.extOk(this.openedFile)){ setTimeout(this.oldText, 500, this); } }