Update migrate.ts (#1000)
This commit is contained in:
parent
e58599b290
commit
e722fcdb4d
1 changed files with 67 additions and 67 deletions
|
@ -51,8 +51,7 @@ export function migrate(state: TDSnapshot, newVersion: number): TDSnapshot {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (version === newVersion) return state
|
if (version !== newVersion) {
|
||||||
|
|
||||||
if (version < 14) {
|
if (version < 14) {
|
||||||
Object.values(document.pages).forEach((page) => {
|
Object.values(document.pages).forEach((page) => {
|
||||||
Object.values(page.shapes)
|
Object.values(page.shapes)
|
||||||
|
@ -130,6 +129,7 @@ export function migrate(state: TDSnapshot, newVersion: number): TDSnapshot {
|
||||||
if (version < 15.5) {
|
if (version < 15.5) {
|
||||||
settings.exportBackground = TDExportBackground.Transparent
|
settings.exportBackground = TDExportBackground.Transparent
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Cleanup
|
// Cleanup
|
||||||
Object.values(document.pageStates).forEach((pageState) => {
|
Object.values(document.pageStates).forEach((pageState) => {
|
||||||
|
|
Loading…
Reference in a new issue