fix: do not filter style properties in style object with value 0

This commit is contained in:
Xymorot 2019-10-11 23:53:18 +02:00
parent 17eddcf157
commit caf1460139
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ export function c(input: Array<string | boolean> | object): string {
export function s(styles: object): string {
return Object.keys(styles)
.filter((key: keyof object) => !!styles[key])
.filter((key: keyof object) => styles[key] === 0 || !!styles[key])
.map((key: keyof object) => `${key}:${styles[key]}`)
.join(';');
}