fix null ptr

This commit is contained in:
sawka 2024-06-21 16:59:09 -07:00
parent 2d1c55471c
commit b668138ae0

View File

@ -97,7 +97,7 @@ function getBlockHeaderText(blockIcon: string, blockData: Block): React.ReactNod
} }
let blockIconElem: React.ReactNode = null; let blockIconElem: React.ReactNode = null;
if (!util.isBlank(blockIcon)) { if (!util.isBlank(blockIcon)) {
let iconColor = blockData.meta["icon:color"]; let iconColor = blockData?.meta?.["icon:color"];
if (iconColor && !iconColor.match(colorRegex)) { if (iconColor && !iconColor.match(colorRegex)) {
iconColor = null; iconColor = null;
} }