Skip to content

Commit

Permalink
add check for now dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
lucleray committed Jul 14, 2019
1 parent 161dde4 commit b3cd426
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ const requireFunc =
typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require

function isLambda() {
return Boolean(process.env['AWS_LAMBDA_FUNCTION_NAME'])
// check for `now dev` environment first
// because `now dev` sets AWS_LAMBDA_FUNCTION_NAME
if (process.env.NOW_REGION === 'dev1') return false

return Boolean(process.env.AWS_LAMBDA_FUNCTION_NAME)
}

async function requireTf() {
Expand Down

0 comments on commit b3cd426

Please sign in to comment.