mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(editor-core): async block support remove property
This commit is contained in:
@@ -143,8 +143,13 @@ export class EditorBlock extends ServiceBaseClass {
|
||||
const decorations = db_block.getDecorations();
|
||||
Object.entries(businessBlock.properties || {}).forEach(
|
||||
([key, value]) => {
|
||||
if (value === undefined) {
|
||||
db_block.removeDecoration(key);
|
||||
return;
|
||||
}
|
||||
if (decorations[key] !== value) {
|
||||
db_block.setDecoration(key, value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user