mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-18 20:16:52 +08:00
13 lines
425 B
Diff
13 lines
425 B
Diff
patch-package
|
|
--- a/node_modules/@octokit/request/lib/fetch.js
|
|
+++ b/node_modules/@octokit/request/lib/fetch.js
|
|
@@ -1,2 +1,6 @@
|
|
-// expose internally used `fetch` method for testing/mocking only
|
|
-module.exports.fetch = require('node-fetch').default
|
|
+module.exports.fetch =
|
|
+ typeof fetch === 'undefined'
|
|
+ ? require('node-fetch').default
|
|
+ : typeof window !== 'undefined'
|
|
+ ? window.fetch.bind(window)
|
|
+ : fetch
|