Skip to content

Commit

Permalink
fix(shared): normalize undefined styles to empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
nVitius committed Aug 25, 2021
1 parent 06051c4 commit 0b3743a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/shared/src/normalizeProp.ts
@@ -1,4 +1,4 @@
import { isArray, isString, isObject, hyphenate } from './'
import { EMPTY_OBJ, isArray, isString, isObject, hyphenate } from './'
import { isNoUnitNumericStyleProp } from './domAttrConfig'

export type NormalizedStyle = Record<string, string | number>
Expand All @@ -24,6 +24,8 @@ export function normalizeStyle(
return value
} else if (isObject(value)) {
return value
} else if (value == null) {
return EMPTY_OBJ
}
}

Expand Down

0 comments on commit 0b3743a

Please sign in to comment.