[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - loleaflet/src

Jan Holesovsky kendy at collabora.com
Fri Jan 8 03:05:15 PST 2016


 loleaflet/src/map/Map.js |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 093348e5ea8e8463ddbcdde9b2d87534ebda5217
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Jan 8 12:00:50 2016 +0100

    loleaflet: Strip trailing '/'s from options.webserver.

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 4a90e4e..6692485 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -51,6 +51,10 @@ L.Map = L.Evented.extend({
 			options.webserver = options.server.replace(/^ws:/i, protocol);
 		}
 
+		// we are adding components like '/insertfile' at the end which would
+		// lead to URL's of the form <webserver>//insertfile/...
+		options.webserver = options.webserver.replace(/\/*$/, '');
+
 		this._handlers = [];
 		this._layers = {};
 		this._zoomBoundLayers = {};


More information about the Libreoffice-commits mailing list