Skip to content

Commit

Permalink
Merge pull request #117 from nicepkg/hofix
Browse files Browse the repository at this point in the history
fix: hotfix fetch bug and not working with copilot
  • Loading branch information
2214962083 authored Nov 12, 2024
2 parents e795f54 + 17d62a9 commit 8ded113
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/extension/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ const enableFetchPolyfill = async () => {

// fuck, vscode fetch not working on v1.92.0
// we add a polyfill here
const {
default: fetch,
Headers,
Request,
Response
} = await import('node-fetch')
const { default: FormData } = await import('form-data')
// const {
// default: fetch,
// Headers,
// Request,
// Response
// } = await import('node-fetch')
// const { default: FormData } = await import('form-data')

Object.assign(globalThis, {
fetch,
FormData,
Headers,
Request,
Response
})
// Object.assign(globalThis, {
// fetch,
// FormData,
// Headers,
// Request,
// Response
// })
}

export const enablePolyfill = async () => {
Expand Down

0 comments on commit 8ded113

Please sign in to comment.