mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat(editor): allow undefined default props (#10701)
Closes: [BS-2771](https://linear.app/affine-design/issue/BS-2771/%E6%84%9F%E8%A7%89%E5%BE%97%E6%94%AF%E6%8C%81%E5%8F%AF%E9%80%89%E5%AD%97%E6%AE%B5[mirone]1f862b1b-8523-4487-a948-fef9174e8825)
This commit is contained in:
@@ -72,6 +72,7 @@ export class FlatSyncController {
|
||||
if (key in proxy) {
|
||||
return;
|
||||
}
|
||||
if (value === undefined) return;
|
||||
proxy[key] = value;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -302,7 +302,9 @@ export class SyncController {
|
||||
if (key in props) return;
|
||||
|
||||
const yValue = native2Y(value);
|
||||
this.yBlock.set(`prop:${key}`, yValue);
|
||||
if (value !== undefined) {
|
||||
this.yBlock.set(`prop:${key}`, yValue);
|
||||
}
|
||||
props[key] = this._getPropsProxy(key, yValue);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user