forked from extern/egroupware
Only try to unbind if there's a value. If there isn't a value (new entry), handler wasn't bound, and trying causes an error.
Fixes blank popup after save.
This commit is contained in:
parent
e94b62bd5e
commit
51d802ec78
@ -173,8 +173,11 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],
|
||||
* Destroys all
|
||||
*/
|
||||
destroy: function() {
|
||||
// Unbind
|
||||
$j(window).off('.' +this.options.value.app + this.options.value.id);
|
||||
// Unbind, if bound
|
||||
if(this.options.value && !this.options.value.id)
|
||||
{
|
||||
$j(window).off('.' +this.options.value.app + this.options.value.id);
|
||||
}
|
||||
|
||||
// Free the widgets
|
||||
for(var i = 0; i < this.columns.length; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user