Skip to content

Commit

Permalink
fix react native error (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ergenekonyigit authored Apr 12, 2022
1 parent 7a639b2 commit 8f71d52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ function inIframe() {
}
}

const IS_BROWSER = typeof window !== 'undefined'
const IS_BROWSER =
typeof window !== 'undefined' &&
window.navigator.product === 'Gecko'
const IS_UNSUPPORTED_CONSOLE =
IS_BROWSER &&
/(\.stackblitz\.io|\.csb\.app)$/.test(location.host) &&
Expand Down
2 changes: 1 addition & 1 deletion test/basic.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('useTilg', () => {
reset()

expect(logs[0][0]).toEqual(
'\x1B[96m\x1B[1m<App/>\x1B[39m\x1B[22m rendered. Props: \x1B[96m\x1B[1m%o\x1B[39m\x1B[22m'
'\x1B[96m\x1B[1m<App/>\x1B[39m\x1B[22m rendered with props: \x1B[96m\x1B[1m%o\x1B[39m\x1B[22m.'
)
expect(logs[0][1]).toEqual({})
expect(logs[1][0]).toEqual('\x1B[96m\x1B[1m<App/>\x1B[39m\x1B[22m mounted.')
Expand Down

0 comments on commit 8f71d52

Please sign in to comment.