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))}
|
onDiscard={() => setJunctionSession((current) => (current ? cancelJunctionSession(current) : current))}
|
||||||
onSave={() => {
|
onSave={() => {
|
||||||
try {
|
try {
|
||||||
setJunctionSession((current) => (current ? saveJunctionSession(current, editRevision) : current));
|
void saveDirectEdits().then((saved) => {
|
||||||
setStatus('路口草稿已保存');
|
if (!saved) return;
|
||||||
|
setJunctionSession((current) => (current ? saveJunctionSession(current, editRevision) : current));
|
||||||
|
setStatus('路口草稿已保存并重新生成');
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setStatus((error as Error).message);
|
setStatus((error as Error).message);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user