From 5783a20794c6411231c22d89f2fd0eaf08c48953 Mon Sep 17 00:00:00 2001 From: George Stephanis Date: Mon, 10 Aug 2015 16:05:49 -0400 Subject: [PATCH] Don't use `this` in a callback with the wrong context. @todo: Find a way to stop needing to refer to the specific instance from the abstract class. --- assets/js/admin/settings-views-html-settings-tax.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/admin/settings-views-html-settings-tax.js b/assets/js/admin/settings-views-html-settings-tax.js index f3f1468f855..322fdb7c78d 100644 --- a/assets/js/admin/settings-views-html-settings-tax.js +++ b/assets/js/admin/settings-views-html-settings-tax.js @@ -72,7 +72,8 @@ this.needsUnloadConfirm = false; }, unloadConfirmation : function(e) { - if ( this.needsUnloadConfirm ) { + // @todo: Find a way to stop needing to refer to the specific instance from the abstract class. + if ( WCTaxTableInstance.needsUnloadConfirm ) { e.returnValue = data.strings.unload_confirmation_msg; window.event.returnValue = data.strings.unload_confirmation_msg; return data.strings.unload_confirmation_msg;