refactor: environment setup (#2898)

Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
This commit is contained in:
Alex Yang
2023-06-28 19:19:19 +08:00
committed by GitHub
parent 80c2a78273
commit 5496969e58
72 changed files with 255 additions and 242 deletions

View File

@@ -91,12 +91,12 @@ function runBlockMigration(
return;
}
if (flavour === 'affine:surface' && version <= 3) {
if(data.has('elements')){
if (data.has('elements')) {
const elements = data.get('elements') as Y.Map<unknown>;
data.set('prop:elements', elements.clone());
data.delete('elements');
} else {
data.set('prop:elements', new Y.Map())
data.set('prop:elements', new Y.Map());
}
}
if (flavour === 'affine:embed') {