Fix yaml name collision in card editor (#4079)

* Fix `yaml` name collision

* Add types for js-yaml change to named imports
This commit is contained in:
Bram Kragten
2019-10-21 17:36:09 +02:00
committed by GitHub
parent 6d10a5dd4c
commit 5e3cb812ec
10 changed files with 30 additions and 24 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { html } from "@polymer/polymer/lib/utils/html-tag";
import { PolymerElement } from "@polymer/polymer/polymer-element";
import JsYaml from "js-yaml";
import { safeLoad } from "js-yaml";
import { createCardElement } from "../../../src/panels/lovelace/common/create-card-element";
@@ -62,7 +62,7 @@ class DemoCard extends PolymerElement {
card.removeChild(card.lastChild);
}
const el = createCardElement(JsYaml.safeLoad(config.config)[0]);
const el = createCardElement(safeLoad(config.config)[0]);
el.hass = this.hass;
card.appendChild(el);
}