소스 검색

chore: fix type issue

Evan You 5 년 전
부모
커밋
cac6ab5bdb
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  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) {