Skip to content

Commit

Permalink
log non array object separately from thrown Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Nov 8, 2024
1 parent 8d04a54 commit 92af532
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/universal-remote-card.min.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/universal-remote-card-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2221,7 +2221,10 @@ export class UniversalRemoteCardEditor extends LitElement {
this.customActionsFromFile = json;
this.requestUpdate();
} else {
throw TypeError(`Not an array\n${json}`);
console.error(json);
throw TypeError(
'Provided file is not an array',
);
}
});
break;
Expand All @@ -2237,7 +2240,10 @@ export class UniversalRemoteCardEditor extends LitElement {
this.customActionsFromFile = json;
this.requestUpdate();
} else {
throw TypeError(`Not an array\n${json}`);
console.error(json);
throw TypeError(
'Provided file is not an array',
);
}
});
break;
Expand Down
10 changes: 8 additions & 2 deletions src/universal-remote-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,10 @@ class UniversalRemoteCard extends LitElement {
this.customActionsFromFile = json;
this.requestUpdate();
} else {
throw TypeError(`Not an array\n${json}`);
console.error(json);
throw TypeError(
'Provided file is not an array',
);
}
});
break;
Expand All @@ -529,7 +532,10 @@ class UniversalRemoteCard extends LitElement {
this.customActionsFromFile = json;
this.requestUpdate();
} else {
throw TypeError(`Not an array\n${json}`);
console.error(json);
throw TypeError(
'Provided file is not an array',
);
}
});
break;
Expand Down

0 comments on commit 92af532

Please sign in to comment.