Skip to content

Commit fa7bf58

Browse files
committed
fix: send in module conditionally since it may not be available in ES contexts
1 parent f231c4e commit fa7bf58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/remix/src/server/instrumentServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export const makeWrappedCreateRequestHandler = (options?: { instrumentTracing?:
483483
export function instrumentServer(options?: { instrumentTracing?: boolean }): void {
484484
const pkg = loadModule<{
485485
createRequestHandler: CreateRequestHandlerFunction;
486-
}>('@remix-run/server-runtime', module);
486+
}>('@remix-run/server-runtime', typeof module !== 'undefined' ? module : undefined);
487487

488488
if (!pkg) {
489489
DEBUG_BUILD && debug.warn('Remix SDK was unable to require `@remix-run/server-runtime` package.');

0 commit comments

Comments
 (0)