mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
fix(editor): get block props (#11807)
Closes: [BS-3184](https://linear.app/affine-design/issue/BS-3184/duplicate-图片,一直在loading)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
export function getBlockProps(model: BlockModel): Record<string, unknown> {
|
||||
const keys = model.keys as (keyof typeof model)[];
|
||||
const values = keys.map(key => model[key]);
|
||||
const blockProps = Object.fromEntries(keys.map((key, i) => [key, values[i]]));
|
||||
return blockProps;
|
||||
const keys = model.keys as (keyof typeof model.props)[];
|
||||
return Object.fromEntries(keys.map(key => [key, model.props[key]]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user