From f7dc4caa6a90d2e11924d2beb868d31344a002a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Fri, 28 Dec 2018 15:55:05 +0100 Subject: [PATCH] Downgrade to ES6. Fix #2 --- card-tools.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/card-tools.js b/card-tools.js index 4f0fe91..449ff46 100644 --- a/card-tools.js +++ b/card-tools.js @@ -16,7 +16,7 @@ if (!window.cardTools){ }; cardTools.LitElement = - Object.getPrototypeOf(customElements.get('hui-error-entity-row')); + Object.getPrototypeOf(customElements.get('hui-section-row')); cardTools.litHtml = cardTools.LitElement.prototype.html; @@ -137,7 +137,7 @@ if (!window.cardTools){ }; if(!config || typeof config !== "object" || (!config.entity && !config.type)) { - config = {error: "Invalid config given", ...config}; + Object.assign(config, {error: "Invalid config given"}); return cardTools.createThing("", config); } @@ -146,7 +146,7 @@ if (!window.cardTools){ return cardTools.createThing("row", config); const domain = config.entity.split(".", 1)[0]; - config = {type: DEFAULT_ROWS[domain] || "text", ...config}; + Object.assign(config, {type: DEFAULT_ROWS[domain] || "text"}); return cardTools.createThing("entity-row", config); };