Skip to content

Commit

Permalink
expose websocket in node bundle (#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Sep 15, 2023
1 parent a41c6e6 commit a926023
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index-fetch.js
Expand Up @@ -2,9 +2,9 @@

const fetchImpl = require('./lib/fetch').fetch

module.exports.fetch = async function fetch (resource) {
module.exports.fetch = async function fetch (resource, init = undefined) {
try {
return await fetchImpl(...arguments)
return await fetchImpl(resource, init)
} catch (err) {
Error.captureStackTrace(err, this)
throw err
Expand All @@ -14,3 +14,4 @@ module.exports.FormData = require('./lib/fetch/formdata').FormData
module.exports.Headers = require('./lib/fetch/headers').Headers
module.exports.Response = require('./lib/fetch/response').Response
module.exports.Request = require('./lib/fetch/request').Request
module.exports.WebSocket = require('./lib/websocket/websocket').WebSocket

0 comments on commit a926023

Please sign in to comment.