fix(workbench): persist junction workspace edits
This commit is contained in:
1 parent
b7d9a1973e
commit
3811790dc8
1 file changed
+5
-2
@@ -1040,8 +1040,11 @@ function App() {
|
||||
onDiscard={() => setJunctionSession((current) => (current ? cancelJunctionSession(current) : current))}
|
||||
onSave={() => {
|
||||
try {
|
||||
setJunctionSession((current) => (current ? saveJunctionSession(current, editRevision) : current));
|
||||
setStatus('路口草稿已保存');
|
||||
void saveDirectEdits().then((saved) => {
|
||||
if (!saved) return;
|
||||
setJunctionSession((current) => (current ? saveJunctionSession(current, editRevision) : current));
|
||||
setStatus('路口草稿已保存并重新生成');
|
||||
});
|
||||
} catch (error) {
|
||||
setStatus((error as Error).message);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user