fix(server-runtime): preserve explicit empty route destinations (#1521)

This commit is contained in:
Ryanba
2026-03-30 17:16:49 +08:00
committed by GitHub
parent 2ee8174815
commit 2caae8ee41
@@ -79,7 +79,7 @@ export function createPolicyMiddleware(policy: RoutingPolicy): RouteMiddleware {
}
export function collectDestinations(event: WebSocketEvent | (Omit<WebSocketEvent, 'metadata'> & Partial<Pick<WebSocketEvent, 'metadata'>>)) {
if (event.route?.destinations !== undefined) {
if (event.route && 'destinations' in event.route) {
return event.route.destinations
}