Skip to content

Commit

Permalink
resolve before close
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Feb 25, 2024
1 parent 37ae2f4 commit c2d90e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@
}
ok_button.on('click', () => {
const selected = fm.selectedFiles()
if(config === undefined || !config.close_on_select) api.close()
resolve(selected);
if(config === undefined || !config.close_on_select) api.close()
})
ok_button.hide()
fm.select(() => {
ok_button.show()
})
cancel_button.on('click', () => {
if(config === undefined || !config.close_on_select) api.close()
resolve([])
if(config === undefined || !config.close_on_select) api.close()
})
// adjust the window size
window.dispatchEvent(new Event('resize'))
Expand Down

0 comments on commit c2d90e1

Please sign in to comment.