Skip to content

Commit 685f479

Browse files
committed
修复导入 bug
1 parent b3a8705 commit 685f479

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/types/data.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,14 @@ export function toPrivateData(input: Object) {
211211
updateOnMouseMove: false,
212212
})
213213
),
214-
derivative: ({ derivative = {} }) =>
215-
amendAttr(derivative, {
216-
fn: "",
217-
x0: 0,
218-
updateOnMouseMove: false,
219-
}),
214+
derivative: ({ derivative }) =>
215+
!derivative
216+
? undefined
217+
: amendAttr(derivative, {
218+
fn: "",
219+
x0: 0,
220+
updateOnMouseMove: false,
221+
}),
220222
...getFunctionGlobals(),
221223
}
222224
);

0 commit comments

Comments
 (0)