This commit is contained in:
@ -31,9 +31,11 @@ export function ConfigImportExportButtons(p: {
|
||||
fileEl.click();
|
||||
|
||||
// Wait for a file to be chosen
|
||||
await new Promise((res, _rej) =>
|
||||
{ fileEl.addEventListener("change", () => { res(null); }); }
|
||||
);
|
||||
await new Promise((res) => {
|
||||
fileEl.addEventListener("change", () => {
|
||||
res(null);
|
||||
});
|
||||
});
|
||||
|
||||
if ((fileEl.files?.length ?? 0) === 0) return null;
|
||||
|
||||
|
Reference in New Issue
Block a user