This commit is contained in:
Joao Moreno 2019-10-21 16:15:43 +02:00
parent ad9bce8978
commit 0b347ca8cf

View file

@ -49,11 +49,12 @@ export class URLHandlerRouter implements IClientRouter<string> {
const uri = URI.revive(arg);
if (uri && uri.query) {
const match = /\bwindowId=([^&]+)/.exec(uri.query);
const match = /\bwindowId=(\d+)/.exec(uri.query);
if (match) {
const windowId = match[1];
const connection = first(hub.connections, c => c.ctx === windowId);
const regex = new RegExp(`window:${windowId}`);
const connection = first(hub.connections, c => regex.test(c.ctx));
if (connection) {
return connection;