Fixed "cannot read property 'title_color' of undefined

Signed-off-by: Florian Bouillon <florian.bouillon@delta-wings.net>
This commit is contained in:
Florian Bouillon 2020-09-21 16:53:38 +02:00
parent e3ccb147f6
commit 41b7b5afff

View File

@ -34,8 +34,8 @@ export default class Card {
this.hideBorder = parseBoolean(options.hide_border)
this.hideTitle = parseBoolean(options.hide_title)
this.colors = {
titleColor: getColor('title_color', options.title_color, options.theme),
bgColor: getColor('bg_color', options.bg_color, options.theme)
titleColor: getColor('title_color', options?.title_color, options?.theme),
bgColor: getColor('bg_color', options?.bg_color, options?.theme)
}
}
}