mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-12 02:00:40 +08:00
Fix import
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user