From 280f62fbda418be4c70fb82b11b76cf36302927e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 27 Oct 2015 13:39:08 +0000 Subject: [PATCH] only catch "Permission denied" errors and rethrow all other, because error in et2_ready or load handler will cause a double loading of UI otherwise --- etemplate/js/etemplate2.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index d309926abb..c4566e20bf 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -558,8 +558,15 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) } catch (e) { // wired security exception in IE denying access to template cache in opener - //this.templates = - etemplate2.prototype.templates = {}; + if (e.message == 'Permission denied') + { + etemplate2.prototype.templates = {}; + } + // other error eg. in app.js et2_ready or event handlers --> rethrow it + else + { + throw e; + } } // Asynchronously load the XET file et2_loadXMLFromURL(_url, function(_xmldoc) {