mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
The following code seems redundant
This commit is contained in:
@@ -189,14 +189,8 @@ export class ServerMqtt extends Server implements CustomTransportStrategy {
|
||||
if (this.messageHandlers.has(route)) {
|
||||
return this.messageHandlers.get(route) || null;
|
||||
}
|
||||
|
||||
|
||||
for (const [key, value] of this.messageHandlers) {
|
||||
if (
|
||||
!key.includes(MQTT_WILDCARD_SINGLE) &&
|
||||
!key.includes(MQTT_WILDCARD_ALL)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
const keyWithoutSharedPrefix = this.removeHandlerKeySharedPrefix(key);
|
||||
if (this.matchMqttPattern(keyWithoutSharedPrefix, route)) {
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user