Skip to content

Commit

Permalink
Fixed #476 - Uncaught Error: DOM element provided is null or undefine…
Browse files Browse the repository at this point in the history
…d is thrown on an attempt to programmatically enable the "bar" chart for Boolean questions
  • Loading branch information
tsv2013 committed Sep 16, 2024
1 parent 72386c2 commit ab0a4bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/plotly/rating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ export class PlotlyGaugeAdapter {
}

public destroy(node: HTMLElement) {
(<any>Plotly).purge(node);
if(!!node) {
(<any>Plotly).purge(node);
}
this._chart = undefined;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/plotly/selectBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ export class PlotlyChartAdapter {
}

public destroy(node: HTMLElement) {
(<any>Plotly).purge(node);
if(!!node) {
(<any>Plotly).purge(node);
}
this._chart = undefined;
}
}
Expand Down

0 comments on commit ab0a4bf

Please sign in to comment.