Skip to content

Commit

Permalink
add length check
Browse files Browse the repository at this point in the history
  • Loading branch information
lovedeep92 committed May 17, 2021
1 parent a297c4e commit 8bc02e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/line-graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class LineGraph extends HTMLElement {
});
this.shadowRoot.appendChild(svg);
var newData = this.formatMutlipleData(data, this.dataset.group);
if(newData) {
if(newData.length > 0) {
this.renderGraph(this.parseData(newData), svg);
}
}
Expand Down

0 comments on commit 8bc02e3

Please sign in to comment.