Fixes media editing undo

This commit is contained in:
Josh Perez 2021-12-07 17:37:18 -05:00 committed by GitHub
parent d9990c162e
commit e81821f4a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -109,7 +109,7 @@ export class FabricHistory extends EventEmitter {
}
if (this.canRedo()) {
this.snapshots.splice(this.highWatermark, this.snapshots.length);
this.snapshots.splice(this.highWatermark + 1, this.snapshots.length);
}
this.snapshots.push({ canvasState: this.getState(), imageState });