Skip to content

Commit

Permalink
fix(RenderWindowInteractor): guard against undefined exitPointerLock
Browse files Browse the repository at this point in the history
Certain versions of Safari on iOS do not implement document.exitPointerLock.
  • Loading branch information
floryst committed Aug 1, 2023
1 parent 86adc56 commit 18bf515
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Rendering/Core/RenderWindowInteractor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ function vtkRenderWindowInteractor(publicAPI, model) {
};

//----------------------------------------------------------------------
publicAPI.exitPointerLock = () => document.exitPointerLock();
publicAPI.exitPointerLock = () => document.exitPointerLock?.();

//----------------------------------------------------------------------
publicAPI.isPointerLocked = () =>
Expand Down

0 comments on commit 18bf515

Please sign in to comment.