Skip to content

Commit a176070

Browse files
committed
fix(runtime-vapor): prevent hasOwnProperty error when dynamic prop is null
1 parent bb4ae25 commit a176070

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-vapor/src/componentProps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export function getAttrFromRawProps(rawProps: RawProps, key: string): unknown {
186186
source = dynamicSources[i]
187187
isDynamic = isFunction(source)
188188
source = isDynamic ? (source as Function)() : source
189-
if (hasOwn(source, key)) {
189+
if (source && hasOwn(source, key)) {
190190
const value = isDynamic ? source[key] : source[key]()
191191
if (merged) {
192192
merged.push(value)

0 commit comments

Comments
 (0)