Skip to content

Commit

Permalink
(dherault#1008) Move default handler to check for default route first
Browse files Browse the repository at this point in the history
  • Loading branch information
kevbot-git committed Mar 25, 2021
1 parent c284577 commit a5439e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/events/websocket/WebSocketClients.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export default class WebSocketClients {

if (!functionKey && route !== '$connect' && route !== '$disconnect') {
functionKey = this.#webSocketRoutes.get('$default')
}

if (!functionKey) {
debugLog(`Unhandled route '${route}'`)

websocketClient.send(
stringify({
Expand All @@ -95,10 +99,6 @@ export default class WebSocketClients {
}),
)

debugLog(`Unhandled route '${route}'`)
}

if (!functionKey) {
return
}

Expand Down

0 comments on commit a5439e2

Please sign in to comment.