widget: color: prevent assigning "undefined" as css var (breaks in ios) (#214)

This commit is contained in:
jean-emmanuel 2018-03-09 00:32:37 +01:00
parent fd000711bd
commit 4332af9038
2 changed files with 3 additions and 1 deletions

View file

@ -2,6 +2,8 @@
## 0.26.3
- bug fixes
- ios: broken default accent color in clone widgets
- widgets
- strip: `spacing` now accepts percents

View file

@ -547,7 +547,7 @@ class Widget extends EventEmitter {
if (styles.includes('color')) {
// color
this.container.style.setProperty('--color-custom', this.getProp('color') != 'auto' ? this.getProp('color') : '')
this.container.style.setProperty('--color-custom', this.getProp('color') && this.getProp('color') != 'auto' ? this.getProp('color') : '')
}