Skip to content

Commit

Permalink
fix an issue when using cancel button in file dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
crocsg committed Oct 20, 2024
1 parent f8f825c commit 4449f74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ const File = (props) => {
GetLocaleString("file.all")//Tous"
]
let ret = await window.pywebview.api.load_file(dialogtitle, filter);
console.log(ret);


if (ret.length > 0) {
let data = JSON.parse(ret);
canv.importJSON(data.data);
//console.log (data.data.length);
if (data.data.length > 0)
canv.importJSON(data.data);
}
}
};
Expand Down

0 comments on commit 4449f74

Please sign in to comment.