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,