From 36fa6e27be498cd3bde2ad277459e23907695ecf Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 29 May 2012 23:05:26 +0000 Subject: [PATCH] Fix apply / reload failure --- etemplate/js/et2_widget_historylog.js | 10 +++++----- etemplate/js/et2_widget_link.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etemplate/js/et2_widget_historylog.js b/etemplate/js/et2_widget_historylog.js index e604d1bddd..8bc6c91be8 100644 --- a/etemplate/js/et2_widget_historylog.js +++ b/etemplate/js/et2_widget_historylog.js @@ -144,13 +144,13 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{ { this.fields[key].widget.destroy(); } - this.diff.widget.destroy(); + if(this.diff) this.diff.widget.destroy(); // Free the grid components - this.dataview.free(); - this.rowProvider.free(); - this.controller.free(); - this.dynheight.free(); + if(this.dataview) this.dataview.free(); + if(this.rowProvider) this.rowProvider.free(); + if(this.controller) this.controller.free(); + if(this.dynheight) this.dynheight.free(); this._super.apply(this, arguments); }, diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 186b2da1ce..4daead6913 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -695,7 +695,7 @@ var et2_link = et2_valueWidget.extend([et2_IDetachedDOM], { this.setDOMNode(this.link[0]); }, destroy: function() { - this.link.unbind(); + if(this.link) this.link.unbind(); this.link = null; },