diff options
Diffstat (limited to 'src/client/util/UndoManager.ts')
-rw-r--r-- | src/client/util/UndoManager.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts index 27aed4bac..f7c3e5a7b 100644 --- a/src/client/util/UndoManager.ts +++ b/src/client/util/UndoManager.ts @@ -1,4 +1,4 @@ -import { observable, action } from "mobx"; +import { observable, action, runInAction } from "mobx"; import 'source-map-support/register'; import { Without } from "../../Utils"; import { string } from "prop-types"; @@ -140,10 +140,11 @@ export namespace UndoManager { } }); + //TODO Make this return the return value export function RunInBatch(fn: () => void, batchName: string) { let batch = StartBatch(batchName); try { - fn(); + runInAction(fn); } finally { batch.end(); } |