more name binding cleanup

This commit is contained in:
Stewart Allen 2021-12-29 07:54:16 -05:00
commit 61ad82be61
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ class Broker {
}
if (channel.indexOf(listener) < 0) {
let send = this.send;
let name = topic.replace(/\./g, '_');
let name = topic.replace(/[\\ \.-]/g, '_');
send[name] = send[name] = this.bind(topic);
channel.push(listener);
this.publish(".topic.add", topic);