We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f0c088 commit c4e14faCopy full SHA for c4e14fa
src/editor/import.vue
@@ -60,10 +60,13 @@ function handleImport() {
60
try {
61
const parsed = JSON5.parse(importStr.value);
62
if (typeof parsed !== "object" || parsed === null) throw null;
63
- if(typeof parsed.data !== "object" || !Array.isArray(parsed.data)) throw null;
64
- profile.data = toInternalDatum(
+ if (typeof parsed.data !== "object" || !Array.isArray(parsed.data))
+ throw null;
65
+ const newData = toInternalDatum(
66
(JSON5.parse(importStr.value).data as FunctionPlotDatum[]) ?? []
67
);
68
+ profile.data = [];
69
+ profile.data = newData;
70
Snackbar.builder({
71
text: t("title.importSuccess"),
72
type: "success",
0 commit comments