mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-06 20:11:38 +08:00
Bug: none Change-Id: I157e7f5ddff43eb17fe371cc1437a636ad42cd4f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3641417 Commit-Queue: Randolf Jung <jrandolf@google.com> Reviewed-by: Simon Zünd <szuend@chromium.org>
12 lines
267 B
JavaScript
12 lines
267 B
JavaScript
const fetchNode = require('./node-ponyfill')
|
|
const fetch = fetchNode.fetch.bind({})
|
|
|
|
fetch.polyfill = true
|
|
|
|
if (!global.fetch) {
|
|
global.fetch = fetch
|
|
global.Response = fetchNode.Response
|
|
global.Headers = fetchNode.Headers
|
|
global.Request = fetchNode.Request
|
|
}
|