Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gk0Wk committed Oct 23, 2023
1 parent d63497f commit d80efbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/echarts/addons/Gk0Wk/Function/Function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ const addon: IScriptAddon<void> = {
[maxX, minX] = [minX, maxX];
}
// eslint-disable-next-line @typescript-eslint/no-implied-eval, no-new-func
const func = new Function(
const func_ = new Function(
'x',
`return ${addonAttributes.func};` || 'return x;',
);
const func = (x: number) => Math.max(-9e8, Math.min(9e8, func_(x)));

// 采样
const points = [];
Expand Down
2 changes: 1 addition & 1 deletion src/echarts/plugin.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.11",
"version": "0.2.12",
"type": "application/json",
"title": "$:/plugins/Gk0Wk/echarts",
"plugin-type": "plugin",
Expand Down

0 comments on commit d80efbd

Please sign in to comment.