core: fix websocket can not generate url (#825)

This commit is contained in:
panda authored and GitHub committed 2024-06-11 11:34:42 +08:00
1 parent ae057fee95
commit 311caee154
1 file changed
+1 -1
+1 -1
View File
@@ -209,7 +209,7 @@ export async function apply(ctx: Context) {
? (!host.includes(this.request.host))
: this.request.host !== host)
)) withDomainId ||= domainId;
res = this.context.router.url.call(this.context.router, name, args, { query }).toString();
res = ctx.server.router.url.call(ctx.server.router, name, args, { query }).toString();
if (anchor) res = `${res}#${anchor}`;
if (withDomainId) res = `/d/${withDomainId}${res}`;
} catch (e) {