cancel if result is undefined

This commit is contained in:
HorizonCode 2022-10-16 16:47:43 +02:00
parent 071b13ee6e
commit 356ec5d7e0

View File

@ -16,7 +16,9 @@ window.addEventListener('DOMContentLoaded', () => {
const $ = require('jquery'); const $ = require('jquery');
$("#folder-btn").on('click', async () => { $("#folder-btn").on('click', async () => {
const folderLoc = await ipcRenderer.invoke('open-folder-dialog'); const success = await ipcRenderer.invoke('set-osu-dir');
alert(folderLoc); if (success == undefined)
return;
alert(success);
}); });
}) })