mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-24 08:42:08 +03:00
fix(core): options might undefined (#3999)
Co-authored-by: zuozijian3720 <zuozijian1994@gmail.com>
This commit is contained in:
parent
41f2420533
commit
06cec822f0
@ -146,9 +146,12 @@ export const BlockSuitePageList = ({
|
||||
const tagOptionMap = useMemo(
|
||||
() =>
|
||||
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(
|
||||
() =>
|
||||
|
@ -41,7 +41,7 @@ export const variableDefineMap = {
|
||||
icon: <FavoriteIcon />,
|
||||
},
|
||||
Tags: {
|
||||
type: meta => tArray(tTag.create({ tags: meta.tags.options })),
|
||||
type: meta => tArray(tTag.create({ tags: meta.tags?.options ?? [] })),
|
||||
icon: <TagsIcon />,
|
||||
},
|
||||
// Imported: {
|
||||
|
Loading…
Reference in New Issue
Block a user