Michigan-Tech-Courses / rate-my-professors

a basic wrapper for Rate My Professors's GraphQL API
MIT License
11 stars 9 forks source link

Use global fetch if in browser environment, else use cross-fetch #23

Open njerig opened 1 year ago

njerig commented 1 year ago

isomorphic-fetch uses the same browser polyfill as cross-fetch and therefore shouldn't be used if graphql-request already uses cross-fetch. Instead, we check to see whether the global fetch defined in browsers exists. If it does, we use it; if it doesn't, we use cross-fetch.

Resolves: #17 Related pull request that was never merged: lquixada/cross-fetch#138