fix build

This commit is contained in:
codetypes committed 2024-04-17 11:33:39 +08:00
1 parent 809f8c1461
commit 708102e67b
1 file changed
+3 -2
+3 -2
View File
@@ -231,10 +231,12 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
buildProject: () => { buildProject: () => {
const workspace = get(); const workspace = get();
if (!buildDir && workspace.path) { if (workspace.path)
if (!buildDir) {
buildDir = dialog.showOpenDialogSync({ buildDir = dialog.showOpenDialogSync({
properties: ["openDirectory", "createDirectory"], properties: ["openDirectory", "createDirectory"],
})?.[0]; })?.[0];
}
if (buildDir) { if (buildDir) {
for (const editor of workspace.editors) { for (const editor of workspace.editors) {
editor.dispatch?.("save"); editor.dispatch?.("save");
@@ -252,7 +254,6 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
console.error(error); console.error(error);
} }
} }
}
}, },
batchProject: () => { batchProject: () => {