mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
refactor(editor): add runtime type checks to database cell values (#10770)
This commit is contained in:
@@ -199,7 +199,7 @@ export class BlockQueryDataSource extends DataSourceBase {
|
||||
const property = this.getProperty(propertyId);
|
||||
return (
|
||||
property.getColumnData?.(this.blocks[0].model) ??
|
||||
property.metaConfig.config.defaultData()
|
||||
property.metaConfig.config.propertyData.default()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -284,7 +284,8 @@ export class BlockQueryDataSource extends DataSourceBase {
|
||||
|
||||
currentCells as any
|
||||
) ?? {
|
||||
property: databaseBlockAllPropertyMap[toType].config.defaultData(),
|
||||
property:
|
||||
databaseBlockAllPropertyMap[toType].config.propertyData.default(),
|
||||
cells: currentCells.map(() => undefined),
|
||||
};
|
||||
this.block.doc.captureSync();
|
||||
|
||||
Reference in New Issue
Block a user