Make sure the node is available before addressing its tooltip, fixes broken rename folder action in mail

This commit is contained in:
Hadi Nategh 2018-02-15 14:00:58 +01:00
parent e3c67a1c63
commit 69e83c5aaf

View File

@ -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);
},