mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 01:34:19 +01:00
Address potential undefined
This commit is contained in:
@@ -464,9 +464,9 @@ export const setCssStyle = function (id: string, styles: string[]) {
|
||||
}
|
||||
for (const s of styles) {
|
||||
if (s.includes(',')) {
|
||||
thisClass.styles = thisClass.styles.concat(s.split(','));
|
||||
thisClass.styles = [...thisClass.styles, ...s.split(',')];
|
||||
} else {
|
||||
thisClass.styles.push(s);
|
||||
thisClass.styles?.push(s);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user