Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/kit/src/core/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class Watcher extends EventEmitter {
hooks: {
getSession: hooks.getSession || (() => ({})),
handle: hooks.handle || (({ request, resolve }) => resolve(request)),
serverFetch: hooks.serverFetch || fetch
serverFetch: hooks.serverFetch || globalThis.fetch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the fetch call inside serverFetch? Does that also need to be scoped with globalThis., or does this only affect the default case of not having serverFetch defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's fallback, serverFetch is optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or does this only affect the default case of not having serverFetch defined?

yes.

},
hydrate: this.config.kit.hydrate,
paths: this.config.kit.paths,
Expand Down