diff --git a/packages/core/src/router.ts b/packages/core/src/router.ts index 2851b2aa6..f9312421d 100644 --- a/packages/core/src/router.ts +++ b/packages/core/src/router.ts @@ -573,6 +573,10 @@ export class Router { type: TEventName, callback: (event: GlobalEvent) => GlobalEventResult, ): VoidFunction { + if (isServer) { + return () => {} + } + const listener = ((event: GlobalEvent) => { const response = callback(event) if (event.cancelable && !event.defaultPrevented && response === false) {