Fix import

This commit is contained in:
1ilit
2023-12-20 02:57:29 +02:00
parent dec6362fa9
commit ece4a9e95a
4 changed files with 35 additions and 17 deletions

View File

@@ -1245,10 +1245,10 @@ export default function ControlPanel({
return;
}
const reader = new FileReader();
reader.onload = function (event) {
reader.onload = async (e) => {
let jsonObject = null;
try {
jsonObject = JSON.parse(event.target.result);
jsonObject = JSON.parse(e.target.result);
} catch (error) {
setError({
type: STATUS.ERROR,

View File

@@ -19,7 +19,7 @@ const tableSchema = {
notNull: { type: "boolean" },
increment: { type: "boolean" },
comment: { type: "string" },
length: { type: ["string", "number"] },
size: { type: ["string", "number"] },
values: { type: "array", items: { type: "string" } },
},
required: [