Skip to content

Commit

Permalink
Strict comparison for undefined header check
Browse files Browse the repository at this point in the history
  • Loading branch information
james-relyea committed Mar 26, 2019
1 parent ff4a534 commit 2ac2f80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Expand Up @@ -788,8 +788,8 @@ class Offline {

if (integration === 'lambda') {

const endpointResponseHeaders = (typeof endpoint.response != 'undefined'
&& typeof endpoint.response.headers != 'undefined') ? endpoint.response.headers : {};
const endpointResponseHeaders = (typeof endpoint.response !== 'undefined'
&& typeof endpoint.response.headers !== 'undefined') ? endpoint.response.headers : {};

Object.keys(endpointResponseHeaders)
.filter(key => typeof endpointResponseHeaders[key] === 'string' && /^'.*?'$/.test(endpointResponseHeaders[key]))
Expand Down

0 comments on commit 2ac2f80

Please sign in to comment.