ngx-mqtt
ngx-mqtt copied to clipboard
Topic match error: “sport/+” does not match “sport/”
https://github.com/sclausen/ngx-mqtt/blob/f6f115b4a84fbbacfb1cf572df987531d57e5b90/projects/ngx-mqtt/src/lib/mqtt.service.ts#L156
Should the above code be changed to
return t !== undefined ? match() : false;
[For example, “sport/tennis/+” matches “sport/tennis/player1” and “sport/tennis/player2”, but not “sport/tennis/player1/ranking”. Also, because the single-level wildcard matches only a single level, “sport/+” does not match “sport” but it does match “sport/”. jump to docs https://docs.oasis-open.org