mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-28 05:43:59 -05:00
Don't close the import dialog if an error occurs
This commit is contained in:
@@ -291,12 +291,12 @@ deckImportFileBox.addEventListener('change', async () => {
|
||||
try {
|
||||
const bitmaps = await Promise.all(Array.from(deckImportFileBox.files, f => createImageBitmap(f)));
|
||||
importDecks(bitmaps.map(getCardListFromImageBitmap));
|
||||
deckImportDialog.close();
|
||||
} catch (ex: any) {
|
||||
deckImportErrorBox.innerText = ex.message;
|
||||
deckImportErrorBox.hidden = false;
|
||||
}
|
||||
deckImportFileBox.value = '';
|
||||
deckImportDialog.close();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user