Skip to content

Commit

Permalink
fix: Error was not displayed if duration couldn't be parsed
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Jan 25, 2021
1 parent c71b76a commit 2e2212f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ChartsCard extends LitElement {
serie.group_by.fill = serie.group_by.fill || DEFAULT_GROUP_BY_FILL;
}
if (!parse(serie.group_by.duration)) {
throw `Can't parse 'group_by' duration: '${serie.group_by.duration}'`;
throw new Error(`Can't parse 'series[${index}].group_by.duration': '${serie.group_by.duration}'`);
}
if (serie.entity) {
return new GraphEntry(
Expand Down

0 comments on commit 2e2212f

Please sign in to comment.