|
@@ -103,7 +103,7 @@ export class TLDrawState extends StateManager<Data> {
|
103
|
103
|
super(TLDrawState.defaultState, id, TLDrawState.version, (prev, next) => {
|
104
|
104
|
return {
|
105
|
105
|
...next,
|
106
|
|
- document: { ...next.document, ...prev.document },
|
|
106
|
+ document: { ...next.document, ...prev.document, version: prev.document.version },
|
107
|
107
|
}
|
108
|
108
|
})
|
109
|
109
|
|
|
@@ -129,6 +129,7 @@ export class TLDrawState extends StateManager<Data> {
|
129
|
129
|
})
|
130
|
130
|
} catch (e) {
|
131
|
131
|
console.error('The data appears to be corrupted. Resetting!', e)
|
|
132
|
+ localStorage.setItem(this.document.id + '_corrupted', JSON.stringify(this.document))
|
132
|
133
|
|
133
|
134
|
this.patchState({
|
134
|
135
|
...TLDrawState.defaultState,
|
|
@@ -2457,7 +2458,7 @@ export class TLDrawState extends StateManager<Data> {
|
2457
|
2458
|
}
|
2458
|
2459
|
}
|
2459
|
2460
|
|
2460
|
|
- static version = 12.5
|
|
2461
|
+ static version = 12.6
|
2461
|
2462
|
|
2462
|
2463
|
static defaultDocument: TLDrawDocument = {
|
2463
|
2464
|
id: 'doc',
|