fix: add missing import in index.ts (#188)

* added missing import in index.ts

* commit changes suggested by LuanRT

Co-authored-by: LuanRT <luan.lrt4@gmail.com>

* removed extra require

Co-authored-by: Salvador Ligayao <futuremr.ligayao03@gmail.com>
Co-authored-by: LuanRT <luan.lrt4@gmail.com>
This commit is contained in:
SALVADOR, 1 M. LIGAYAO
2022-09-17 12:30:35 +08:00
committed by GitHub
parent c6482e07b9
commit a90f5eb853

View File

@@ -10,6 +10,11 @@ if (getRuntime() === 'node') {
Reflect.set(globalThis, 'Response', undici.Response);
Reflect.set(globalThis, 'FormData', undici.FormData);
Reflect.set(globalThis, 'File', undici.File);
try {
// eslint-disable-next-line
const { ReadableStream } = require('node:stream/web');
Reflect.set(globalThis, 'ReadableStream', ReadableStream);
} catch { /* do nothing */ }
}
import Innertube from './src/Innertube';