We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2ef0d2 commit 3328ee9Copy full SHA for 3328ee9
src/errors/meilisearch-communication-error.ts
@@ -1,3 +1,4 @@
1
+import 'cross-fetch/polyfill'
2
import { FetchError } from '../types'
3
4
class MeiliSearchCommunicationError extends Error {
src/http-requests.ts
@@ -1,3 +1,5 @@
+
import { Config, EnqueuedTaskObject } from './types'
import { PACKAGE_VERSION } from './package-version'
5
@@ -118,10 +120,6 @@ class HttpRequests {
118
120
body?: any
119
121
config?: Record<string, any>
122
}) {
- if (typeof fetch === 'undefined') {
- require('cross-fetch/dist/node-polyfill')
123
- }
124
-
125
const constructURL = new URL(url, this.url)
126
if (params) {
127
const queryParams = new URLSearchParams()
0 commit comments