Skip to content

Commit

Permalink
Make sure isChromatic returns a boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
kylesuss committed Dec 10, 2020
1 parent 620ebe5 commit 79ae5d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/isChromatic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/isChromatic.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/isChromatic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env browser */

export default function isChromatic() {
return (
return !!(
window.navigator.userAgent.match(/Chromatic/) || window.location.href.match(/chromatic=true/)
);
}

0 comments on commit 79ae5d2

Please sign in to comment.