Explorar el Código

chore: fix type issue

Evan You hace 5 años
padre
commit
cac6ab5bdb
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      packages/shared/src/normalizeProp.ts

+ 4 - 2
packages/shared/src/normalizeProp.ts

@@ -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) {