Skip to content

Commit

Permalink
support serialize BigInt
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Apr 24, 2024
1 parent b031024 commit b46ae99
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/editor/sandbox/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ function setup(isShared) {
const endTime = performance.now();
sendMessage({
evt: 'optionUpdated',
option: JSON.stringify(chart.getOption(), (key, val) =>
echarts.util.isFunction(val) ? val + '' : val
),
option: JSON.stringify(chart.getOption(), (key, val) => {
typeof val == '';
if (echarts.util.isFunction(val) || typeof val === 'bigint') {
return val.toString();
}
return val;
}),
updateTime: endTime - startTime
});
return res;
Expand Down

0 comments on commit b46ae99

Please sign in to comment.