Skip to content

Commit

Permalink
fix(series): add non-null check for seriesData.getLinkedData.
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed May 7, 2024
1 parent 697e798 commit ea0da63
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/model/Series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class SeriesModel<Opt extends SeriesOption = SeriesOption> extends ComponentMode
const task = getCurrentTask(this);
if (task) {
const data = task.context.data;
return (dataType == null ? data : data.getLinkedData(dataType)) as SeriesData<this>;
return (dataType == null || !data.getLinkedData ? data : data.getLinkedData(dataType)) as SeriesData<this>;
}
else {
// When series is not alive (that may happen when click toolbox
Expand Down
252 changes: 251 additions & 1 deletion test/graph-case.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/runTest/actions/__meta__.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/runTest/actions/graph-case.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ea0da63

Please sign in to comment.