mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-23 10:16:43 +02: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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -10,12 +10,12 @@ export interface ClassNode {
|
||||
members: ClassMember[];
|
||||
annotations: string[];
|
||||
domId: string;
|
||||
styles: string[];
|
||||
parent?: string;
|
||||
link?: string;
|
||||
linkTarget?: string;
|
||||
haveCallback?: boolean;
|
||||
tooltip?: string;
|
||||
styles?: string[];
|
||||
}
|
||||
|
||||
export type Visibility = '#' | '+' | '~' | '-' | '';
|
||||
|
Reference in New Issue
Block a user