Address potential undefined
This commit is contained in:
parent
3bb005b973
commit
b51ca4fb15
|
@ -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 = '#' | '+' | '~' | '-' | '';
|
||||
|
|
Loading…
Reference in New Issue