Skip to content

Commit

Permalink
Fixes issue preventing first step from advancing. re #4821
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jun 12, 2019
1 parent ca242e2 commit 0fa611f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arches/app/media/js/viewmodels/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ define([
var components = _.unique(self.steps.map(function(step) {return step.component;}));
require(components, function() {
// var modules = arguments;
var stateStepCount = Object.keys(self.state.steps).length
self.steps.forEach(function(step, i) {
if (!(self.steps[i] instanceof Step)) {
step.workflow = self;
step.loading = self.loading;
step.alert = self.alert;
self.steps[i] = new Step(step);
if (stateStepCount !== 0 && i <= stateStepCount) {
self.steps[i].complete(true);
}
self.steps[i].complete.subscribe(function(complete) {
if (complete) self.next();
});
Expand Down

0 comments on commit 0fa611f

Please sign in to comment.