Skip to content

Commit

Permalink
import load from jsyaml instead of entire lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Dec 21, 2023
1 parent fc8dd22 commit 54c5565
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions dist/android-tv-card.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/android-tv-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { styleMap } from 'lit/directives/style-map.js';

import { HomeAssistant, applyThemesOnElement } from 'custom-card-helpers';
import { renderTemplate } from 'ha-nunjucks';
import yaml from 'js-yaml';
import { load } from 'js-yaml';

import {
IConfig,
Expand Down Expand Up @@ -475,7 +475,7 @@ class AndroidTVCard extends LitElement {
elementName as string,
) as string;
if (typeof elementName == 'string' && elementName.includes('- ')) {
elementName = yaml.load(elementName) as string;
elementName = load(elementName) as string;
}
if (typeof elementName == 'object' && elementName != null) {
rowContent.push(this.buildElements(elementName, !isColumn));
Expand Down

0 comments on commit 54c5565

Please sign in to comment.