Skip to content

Commit

Permalink
fix(lib): node 20.x cause type error: cannot read properties of null …
Browse files Browse the repository at this point in the history
…(reading 'setTimeout')
  • Loading branch information
Badisi committed Oct 18, 2023
1 parent cff604b commit fc68489
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion projects/lib/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const getDataFromUrl = async (url: string | URL): Promise<Buffer> =>
const rawData: Uint8Array[] = [];
res.on('data', (chunk: Uint8Array) => rawData.push(chunk));
res.once('end', () => {
res.setTimeout(0);
res.removeAllListeners();
try {
return resolve(Buffer.concat(rawData));
Expand Down

0 comments on commit fc68489

Please sign in to comment.