Skip to content

Commit 5ce17e4

Browse files
committed
Bugfix regarding styles
1 parent e63d253 commit 5ce17e4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-element",
3-
"version": "0.0.205",
3+
"version": "0.0.206",
44
"description": "",
55
"license": "LGPL-3.0",
66
"main": "./index.js",

src/main/js-element.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,16 @@ class BaseElement extends HTMLElement {
179179
let styles = elemConfigByClass.get(this.constructor)!.styles
180180

181181
if (typeof styles !== 'string') {
182-
styles = typeof styles === 'function' ? styles() : (styles = '')
182+
styles = typeof styles === 'function' ? styles() : styles
183183

184184
if (Array.isArray(styles)) {
185185
styles = styles.map((it) => it.trim()).join('\n\n/*******/\n\n')
186186
}
187187

188+
if (!styles) {
189+
styles = ''
190+
}
191+
188192
elemConfigByClass.get(this.constructor)!.styles = styles
189193
}
190194

0 commit comments

Comments
 (0)