Skip to content

Commit 6d1eba9

Browse files
Fix to allow previous from substeps when there is no backCallback
1 parent 873fd72 commit 6d1eba9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/wizard/wizard-step-directive.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,12 +382,10 @@ angular.module('patternfly.wizard').directive('pfWizardStep', function () {
382382
var goPrev = false;
383383

384384
// Check if callback is a function
385-
if (angular.isFunction (callback)) {
386-
if (callback($scope.selectedStep)) {
387-
if (index !== 0) {
388-
$scope.goTo($scope.getEnabledSteps()[index - 1]);
389-
goPrev = true;
390-
}
385+
if (!angular.isFunction (callback) || callback($scope.selectedStep)) {
386+
if (index !== 0) {
387+
$scope.goTo($scope.getEnabledSteps()[index - 1]);
388+
goPrev = true;
391389
}
392390
}
393391

0 commit comments

Comments
 (0)