Skip to content

Commit

Permalink
Merge pull request #8 from mathieux51/dev
Browse files Browse the repository at this point in the history
v1.0.9
  • Loading branch information
mathieux51 authored May 8, 2020
2 parents 2d6fe40 + f806cf8 commit f54395e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "direct-podcast",
"version": "1.0.8",
"version": "1.0.9",
"private": true,
"dependencies": {
"@sentry/browser": "^5.15.4",
Expand Down
9 changes: 9 additions & 0 deletions src/components/ErrorBoundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ class ErrorBoundary extends React.Component {
return
}

if (error.name && error.name.match("NotAllowedError")) {
this.setState({
component: (
<ErrorComponent text="directpodcast.fr n'a pas trouvé de microphone" />
),
})
return
}

if (
(error.message && error.message.match("NotAllowedError")) ||
(error.name && error.name.match("NotAllowedError"))
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useClickOutside.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const useClickOutide = (ref, callback) => {

const handleClick = React.useCallback(
(evt) => {
if (!ref.current.contains(evt.target)) {
if (ref.current && evt.target && !ref.current.contains(evt.target)) {
callbackRef.current(evt)
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as serviceWorker from "./serviceWorker"

if (process.env.NODE_ENV !== "development") {
Sentry.init({
release: "v1.0.8",
release: "v1.0.9",
dsn:
"https://[email protected]/5208585",
})
Expand Down

0 comments on commit f54395e

Please sign in to comment.