diff --git a/public/src/app.js b/public/src/app.js index 0b23476968..9fbe1c9f14 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -276,7 +276,7 @@ app.cacheBuster = null; if (err) { return app.alertError(err.message); } - if (!ajaxify.currentPage.match(/^chats\//)) { + if (!ajaxify.currentPage.startsWith('chats/')) { app.openChat(roomId); } else { ajaxify.go('chats/' + roomId);