From 91d52ed6ae3dfbc624c867754ebb3e8de274347b Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Wed, 12 Sep 2018 10:20:10 +0200 Subject: [PATCH] Fix coffee as per #179 --- coffees/main.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coffees/main.coffee b/coffees/main.coffee index 1d5746d..a56f97d 100644 --- a/coffees/main.coffee +++ b/coffees/main.coffee @@ -34,11 +34,12 @@ document.addEventListener 'DOMContentLoaded', -> wsUrl = 'ws://' rootPath = document.body.getAttribute('data-root-path') + rootPath = rootPath.replace(/^\/+|\/+$/g, '') if rootPath.length rootPath = "/#{rootPath}" wsUrl += document.location.host + rootPath - path = location.pathname + path = '/' if path.indexOf('/session') < 0 path += "session/#{document.body.getAttribute('data-session-token')}"