From 210dea829ba6cc65513f786d1d21449e12ee624c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 1 Apr 2014 21:42:06 +0000 Subject: [PATCH] Avoid big scary error if server tries to assign on an unloaded etemplate. Log a little friendly warning instead. --- etemplate/js/etemplate2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index e400a31de2..799599c885 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -949,6 +949,12 @@ function etemplate2_handle_assign(type, res, req) this.etemplate_exec_id = res.data.value; return true; } + if(this.widgetContainer == null) + { + // Right etemplate, but it's already been cleared. + egw.debug('warn', "Tried to call assign on an un-loaded etemplate", res.data); + return false; + } var widget = this.widgetContainer.getWidgetById(res.data.id); if (widget) {