Skip to content

Commit

Permalink
fix: safely check __r3f
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Oct 3, 2022
1 parent 14161cf commit bf254b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fiber/src/core/utils.ts
Expand Up @@ -352,7 +352,7 @@ export function applyProps(instance: Instance, data: InstanceProps | DiffSet) {
}

// Call the update lifecycle when it is being updated, but only when it is part of the scene
if (changes.length && instance.__r3f.parent) updateInstance(instance)
if (changes.length && instance.__r3f?.parent) updateInstance(instance)

return instance
}
Expand Down

0 comments on commit bf254b0

Please sign in to comment.