fix: history replace

This commit is contained in:
Konstantinos Kaloutas
2023-03-08 14:34:31 +02:00
committed by Gabriel Horner
parent a345f434e3
commit acd41f71dd
4 changed files with 8 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ export class TLHistory<S extends TLShape = TLShape, K extends TLEventMap = TLEve
@action persist = (replace = false) => {
if (this.isPaused || this.creating) return
this.app.pages.forEach(page => page.bump()) // Is it ok here?
this.app.notify('persist', null)
this.app.notify('persist', {replace})
}
@action undo = () => {

View File

@@ -155,7 +155,7 @@ export type TLSubscriptionEvent =
}
| {
event: 'persist'
info: null
info: { replace: boolean }
}
| {
event: 'save'