Skip to content

Commit

Permalink
Just use development mode when NODE_ENV is development or test (#17)
Browse files Browse the repository at this point in the history
* Just use development mode when sure

* Push version

* Update package.json

* update version

Co-authored-by: chriswdmr <7249920+chriswdmr@users.noreply.github.com>
  • Loading branch information
tobiaslins and chriswdmr authored Nov 14, 2022
1 parent 5799c4f commit 74c2474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vercel/analytics",
"version": "0.1.4",
"version": "0.1.5",
"keywords": [
"analytics",
"vercel"
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ export function isBrowser(): boolean {
}

export function isDevelopment(): boolean {
if (typeof process === 'undefined') return false;
return (
typeof process !== 'undefined' && process.env.NODE_ENV !== 'production'
process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test'
);
}

0 comments on commit 74c2474

Please # to comment.