Skip to content

Commit

Permalink
Merge pull request #129 from kevinlandsberg/master
Browse files Browse the repository at this point in the history
fixed browserslist, fixed process.env for browser environments
  • Loading branch information
jeffbski committed Oct 29, 2018
2 parents eb9ec75 + 8c89fc6 commit 1034a3e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"no-use-before-define": [2, { "functions": false, "classes": true }],
// Disable until Flow supports let and const
"no-var": 0,
"no-undef": 0,
"no-unused-vars": 0,
"object-curly-newline": 0,
"object-curly-spacing": 0,
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"ajv": "^6.5.3",
"babel-loader": "^8.0.1",
"babel-plugin-istanbul": "^5.0.1",
"browserslist": "^4.1.0",
"browserslist": "^4.3.3",
"cross-env": "^5.2.0",
"es-check": "^2.2.0",
"eslint": "^5.5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/createCancelled$.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Subject, timer } from 'rxjs';
import { defaultIfEmpty, tap, take, takeUntil } from 'rxjs/operators';

const NODE_ENV = process.env.NODE_ENV;
const NODE_ENV = (typeof window === 'undefined' && process && process.env && process.env.NODE_ENV) ? process.env.NODE_ENV : '';

// returns { cancelled$, setInterceptComplete }
export default function createCancelled$({ action, cancel$, monitor$, logic }) {
Expand Down
2 changes: 1 addition & 1 deletion src/createLogic.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const allowedProcessOptions = [
'failType',
];

const NODE_ENV = (process && process.env && process.env.NODE_ENV) ? process.env.NODE_ENV : '';
const NODE_ENV = (typeof window === 'undefined' && process && process.env && process.env.NODE_ENV) ? process.env.NODE_ENV : '';

const defaultOptions = {
warnTimeout: 60000,
Expand Down

0 comments on commit 1034a3e

Please sign in to comment.