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: () => {
const workspace = get();
if (!buildDir && workspace.path) {
if (workspace.path)
if (!buildDir) {
buildDir = dialog.showOpenDialogSync({
properties: ["openDirectory", "createDirectory"],
})?.[0];
}
if (buildDir) {
for (const editor of workspace.editors) {
editor.dispatch?.("save");
@@ -252,7 +254,6 @@ export const useWorkspace = create<WorkspaceStore>((set, get) => ({
console.error(error);
}
}
}
},
batchProject: () => {