diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-03-17 12:17:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 12:17:27 -0400 |
commit | 5c874c6829d9957696dfe61014173b6800c864df (patch) | |
tree | 23b7206679d500fc039a4302255cf3d6e17b47d3 /src/client/util/UndoManager.ts | |
parent | a299d1766aa7f4bf3e6bbc3032a39b6b5ae28b4b (diff) | |
parent | 5a385e46937a2f79d557b4ee929e78ba78aca8bf (diff) |
Merge pull request #55 from brown-dash/speedups2
Speedups2
Diffstat (limited to 'src/client/util/UndoManager.ts')
-rw-r--r-- | src/client/util/UndoManager.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/util/UndoManager.ts b/src/client/util/UndoManager.ts index 44e44d335..d1f1a0099 100644 --- a/src/client/util/UndoManager.ts +++ b/src/client/util/UndoManager.ts @@ -1,5 +1,4 @@ import { observable, action, runInAction } from "mobx"; -import 'source-map-support/register'; import { Without } from "../../Utils"; function getBatchName(target: any, key: string | symbol): string { @@ -107,7 +106,7 @@ export namespace UndoManager { } export function FilterBatches(fieldTypes: string[]) { const fieldCounts: { [key: string]: number } = {}; - const lastStack = UndoManager.undoStack.lastElement(); + const lastStack = UndoManager.undoStack.slice(-1)[0];//.lastElement(); if (lastStack) { lastStack.forEach(ev => fieldTypes.includes(ev.prop) && (fieldCounts[ev.prop] = (fieldCounts[ev.prop] || 0) + 1)); const fieldCount2: { [key: string]: number } = {}; |