From: Tobias Lounsbury Date: Thu, 29 Sep 2016 19:26:30 +0000 (-0700) Subject: CRM-19432: Updated crmUiWizardStep destroy code so that it triggers off an event... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e72fdb99214ecacd79fd297e14d2c86fd368e6c2;p=civicrm-core.git CRM-19432: Updated crmUiWizardStep destroy code so that it triggers off an event that is within the digest cycle --- diff --git a/ang/crmUi.js b/ang/crmUi.js index 20bcdbc823..482264bf25 100644 --- a/ang/crmUi.js +++ b/ang/crmUi.js @@ -895,7 +895,7 @@ return form.$valid; }; crmUiWizardCtrl.add(scope); - element.on('$destroy', function(){ + scope.$on('$destroy', function(){ crmUiWizardCtrl.remove(scope); }); }