From 5f21737a42459497837ad640a083cbc8bbfe818a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 15 Feb 2018 14:00:58 +0100 Subject: [PATCH] Make sure the node is available before addressing its tooltip, fixes broken rename folder action in mail --- api/js/etemplate/et2_widget_tree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_tree.js b/api/js/etemplate/et2_widget_tree.js index e459815e30..1d9bed81b6 100644 --- a/api/js/etemplate/et2_widget_tree.js +++ b/api/js/etemplate/et2_widget_tree.js @@ -716,7 +716,8 @@ var et2_tree = (function(){ "use strict"; return et2_inputWidget.extend( */ setLabel: function(_id, _label, _tooltip) { if(this.input == null) return null; - var tooltip = _tooltip || this.getNode(_id).tooltip; + var tooltip = _tooltip || (this.getNode(_id) && this.getNode(_id).tooltip ? + this.getNode(_id).tooltip : ""); this.input.setItemText(_id, this._htmlencode(_label), tooltip); },