mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
fix(core): options might undefined (#3999)
Co-authored-by: zuozijian3720 <zuozijian1994@gmail.com>
This commit is contained in:
@@ -146,9 +146,12 @@ export const BlockSuitePageList = ({
|
|||||||
const tagOptionMap = useMemo(
|
const tagOptionMap = useMemo(
|
||||||
() =>
|
() =>
|
||||||
Object.fromEntries(
|
Object.fromEntries(
|
||||||
blockSuiteWorkspace.meta.properties.tags.options.map(v => [v.id, v])
|
(blockSuiteWorkspace.meta.properties.tags?.options ?? []).map(v => [
|
||||||
|
v.id,
|
||||||
|
v,
|
||||||
|
])
|
||||||
),
|
),
|
||||||
[blockSuiteWorkspace.meta.properties.tags.options]
|
[blockSuiteWorkspace.meta.properties.tags?.options]
|
||||||
);
|
);
|
||||||
const list = useMemo(
|
const list = useMemo(
|
||||||
() =>
|
() =>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export const variableDefineMap = {
|
|||||||
icon: <FavoriteIcon />,
|
icon: <FavoriteIcon />,
|
||||||
},
|
},
|
||||||
Tags: {
|
Tags: {
|
||||||
type: meta => tArray(tTag.create({ tags: meta.tags.options })),
|
type: meta => tArray(tTag.create({ tags: meta.tags?.options ?? [] })),
|
||||||
icon: <TagsIcon />,
|
icon: <TagsIcon />,
|
||||||
},
|
},
|
||||||
// Imported: {
|
// Imported: {
|
||||||
|
|||||||
Reference in New Issue
Block a user