Skip to content

Commit

Permalink
Merge pull request #9 from Li357/master
Browse files Browse the repository at this point in the history
Check if init exists before trying to access timeout
  • Loading branch information
atticoos authored Aug 6, 2018
2 parents 91bda03 + f2d1560 commit cadd6fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch-polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function fetchPolyfill (input, init) {
var xhr = new XMLHttpRequest()

/* @patch: timeout */
if (init.timeout) {
if (init && init.timeout) {
xhr.timeout = init.timeout;
}
/* @endpatch */
Expand Down

0 comments on commit cadd6fd

Please sign in to comment.