chore: fix type issue

This commit is contained in:
Evan You 2021-07-19 11:11:17 -04:00
parent f7607d3a15
commit cac6ab5bdb

View File

@ -41,9 +41,11 @@ export function parseStringStyle(cssText: string): NormalizedStyle {
return ret
}
export function stringifyStyle(styles: NormalizedStyle | undefined): string {
export function stringifyStyle(
styles: NormalizedStyle | string | undefined
): string {
let ret = ''
if (!styles) {
if (!styles || isString(styles)) {
return ret
}
for (const key in styles) {