From: Evan You Date: Mon, 19 Jul 2021 15:11:17 +0000 (-0400) Subject: chore: fix type issue X-Git-Tag: v3.2.0-beta.2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cac6ab5bdb712a3872dfa2b1cd4751d80cb4f38c;p=thirdparty%2Fvuejs%2Fcore.git chore: fix type issue --- diff --git a/packages/shared/src/normalizeProp.ts b/packages/shared/src/normalizeProp.ts index ec765be0f9..cab8090692 100644 --- a/packages/shared/src/normalizeProp.ts +++ b/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) {