Skip to content

Commit a2f623c

Browse files
committed
fix: fix js error.
1 parent 17ba4bf commit a2f623c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/homeCardIcons.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function homeCardIcons(node: Root | RootContent, parent: Root | Element,
3535
const iconNetworkDefaultPath = path.resolve(static_path, `assets/network.svg`);
3636
const iconExist = fs.existsSync(iconPath);
3737
let color = '';
38-
child.properties.style = (child.properties.style as string).replace(COLOR_REG, (str) => {
38+
child.properties.style = (child.properties.style as string)?.replace(COLOR_REG, (str) => {
3939
color = str.replace(COLOR_REG, '$2');
4040
return str.replace(/(\);)/, '/ var(--bg-opacity)$1');
4141
});

0 commit comments

Comments
 (0)