From 1fd14256f7ef9c817538fd0c9689c1bad72c8a86 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 2 Feb 2015 23:32:03 +0000 Subject: [PATCH] Make sure url has a value before matching, prevents errors with some dialogs --- etemplate/js/etemplate2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 22bd2a1b7e..bb18d9eb1f 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -325,7 +325,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) this.name = _name; // store top-level template name to have it available in widgets // store template base url, in case initial template is loaded via webdav, to use that for further loads too // need to split off domain first, as it could contain app-name part of template eg. stylite.report.xet and https://my.stylite.de/egw/... - if (_url[0] != '/') + if (_url && _url[0] != '/') { this.template_base_url = _url.match(/https?:\/\/[^/]+/).shift(); _url = _url.split(this.template_base_url)[1];