mirror of
https://github.com/VisActor/VChart
synced 2024-11-22 07:58:59 +00:00
fix: unit test problems
This commit is contained in:
parent
e2d1457efd
commit
df296bc36a
@ -106,7 +106,7 @@ export abstract class BaseModel<T extends IModelSpec> extends CompilableBase imp
|
||||
}
|
||||
|
||||
protected get _theme() {
|
||||
return this.getSpecInfo().theme;
|
||||
return this.getSpecInfo()?.theme;
|
||||
}
|
||||
|
||||
/** for layout diff */
|
||||
|
@ -41,5 +41,8 @@ export const setProperty = <T>(target: T, path: Array<string | number>, value: a
|
||||
};
|
||||
|
||||
export const getProperty = <T>(target: any, path: Array<string | number>, defaultValue?: T): T => {
|
||||
if (isNil(path)) {
|
||||
return undefined;
|
||||
}
|
||||
return get(target, path as string[], defaultValue) as T;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user