Skip to content

Commit

Permalink
Call checkCameraSupport initially regardless of browser to prevent 20…
Browse files Browse the repository at this point in the history
…00ms interval
  • Loading branch information
Kimmi Gan committed May 18, 2020
1 parent 928ab91 commit dbb36d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Capture/withCameraDetection.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export default WrappedComponent =>
// see https://bugs.webkit.org/show_bug.cgi?id=209580
if (!isSafari131()) {
this.cameraCheckerIntervalId = setInterval(this.checkCameraSupport, 2000)
} else {
this.checkCameraSupport()
}
this.checkCameraSupport()
}

componentWillUnmount () {
Expand Down

0 comments on commit dbb36d5

Please sign in to comment.