From ca76e377cd6740ca308128a3f0b36088771b133d Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 16 Sep 2019 09:46:57 -0600 Subject: [PATCH] Etemplate - avoid JS errors if unloading a nextmatch that didn't get properly initialized. This can happen if the nm is set disabled via server-side modification --- api/js/etemplate/et2_extension_nextmatch.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 0b95f1736e..ba6a207346 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -233,8 +233,14 @@ var et2_nextmatch = (function(){ "use strict"; return et2_DOMWidget.extend([et2_ // Free the grid components this.dataview.free(); - this.rowProvider.free(); - this.controller.free(); + if(this.rowProvider) + { + this.rowProvider.free(); + } + if(this.controller) + { + this.controller.free(); + } this.dynheight.free(); this._super.apply(this, arguments);