Skip to content

Commit

Permalink
fix: dom iterable file list
Browse files Browse the repository at this point in the history
  • Loading branch information
eole1712 committed Oct 4, 2021
1 parent f2fe318 commit 8c6f5ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/altair-app/src/app/modules/altair/utils/index.ts
Expand Up @@ -94,7 +94,7 @@ export const openFiles = async (opts: FileDialogOptions = {}) => {
try {
const files = await fileDialog({ ...opts, multiple: true });

return Promise.all(Array.from(Array(files.length)).map((_, i) => getFileContent(files[i])));
return Promise.all([...files].map((file) => getFileContent(file)));
} catch (err) {
debug.log('There was an issue while opening the files: ', err);

Expand Down
3 changes: 2 additions & 1 deletion packages/altair-app/tsconfig.json
Expand Up @@ -20,8 +20,9 @@
"lib": [
"es2016",
"dom",
"dom.iterable",
"esnext"
],
"module": "es2020"
}
}
}

0 comments on commit 8c6f5ff

Please sign in to comment.