Skip to content

Commit

Permalink
Reverted strict checks because of odd behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-localhost authored Aug 13, 2020
1 parent dace432 commit bc26a6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions seventeen-track-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class SeventeenTrackCard extends HTMLElement {
set hass(hass) {
const entityId = this.config.entity;
const state = hass.states[entityId];
const packages = state.attributes.packages !== null ? state.attributes.packages : [];
const packages = state.attributes.packages != null ? state.attributes.packages : [];

if (!this.content) {
const card = document.createElement('ha-card');
const style = document.createElement('style');
this.content = document.createElement('div');

card.header = this.config.title !== null ? this.config.title : '17Track.net';
card.header = this.config.title != null ? this.config.title : '17Track.net';
style.textContent = `
table {
width: 100%;
Expand Down Expand Up @@ -62,7 +62,7 @@ class SeventeenTrackCard extends HTMLElement {
<tr>
<td>
<a href="https://17track.net/en/track#nums=${elem.tracking_number}" target='_blank'>
${elem.friendly_name !== null && elem.friendly_name !== '' ? elem.friendly_name : elem.tracking_number}
${elem.friendly_name != null && elem.friendly_name != '' ? elem.friendly_name : elem.tracking_number}
</a>
</td>
<td>${elem.info_text}</td>
Expand Down

0 comments on commit bc26a6e

Please sign in to comment.