Skip to content

Commit

Permalink
fix(adapter): Test for navigator before accessing (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
feinoujc authored and offirgolan committed Jan 23, 2019
1 parent 12c8601 commit 7200255
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@pollyjs/adapter/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Adapter {
return false;
}

if (navigator && !navigator.onLine) {
if ('navigator' in global && !navigator.onLine) {
console.warn(
'[Polly] Recording for the following request has expired but the browser is offline.\n' +
`${recordingEntry.request.method} ${recordingEntry.request.url}\n`,
Expand Down

0 comments on commit 7200255

Please sign in to comment.