philschatz / octokat.js

:octocat: Github API Client using Promises or callbacks. Intended for the browser or NodeJS.
http://philschatz.com/2014/05/25/octokat/
MIT License
421 stars 133 forks source link

fix for Firefox and Safari #200

Closed philschatz closed 7 years ago

philschatz commented 7 years ago

The window.fetch() API in Firefox and Safari error when attempting to set the User-Agent Request header. This fix ensures the header is only set for nodejs users.

Thanks @pandafulmanda for nudging me to take a look into this!