Skip to content

Commit

Permalink
fix: don't parse undefined
Browse files Browse the repository at this point in the history
closes #5
  • Loading branch information
arnoson committed Mar 25, 2023
1 parent 1a84f26 commit 90d280a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const createPropsProxy = (

const isConstructor = isBuiltInTypeConstructor(definition)
const providesDefault = !isConstructor
if (value === undefined && providesDefault)
return getDefaultProp(definition)
if (value === undefined)
return providesDefault ? getDefaultProp(definition) : undefined

const type = isConstructor
? definition.prototype.constructor.name.toLowerCase()
Expand Down

0 comments on commit 90d280a

Please sign in to comment.