Skip to content

Commit

Permalink
fix(XR): purge session cache on exit (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored Sep 28, 2022
1 parent 5be4bae commit 5a37eaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/XR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function XRManager({
}
const handleSessionEnd = (nativeEvent: XRManagerEvent) => {
set(() => ({ isPresenting: false, session: null }))
globalSessionStore.setState(() => ({ session: null }))
onSessionEnd?.({ nativeEvent: { ...nativeEvent, target: session }, target: session })
}
const handleVisibilityChange = (nativeEvent: XRSessionEvent) => {
Expand Down

0 comments on commit 5a37eaa

Please sign in to comment.