Fixed race condition where selecte2-ifying the edge type was happening before the digest cycle finished

This commit is contained in:
mabashian 2018-05-23 16:44:44 -04:00
parent 1564f62c2a
commit dbc02ae9a1

View File

@ -6,10 +6,10 @@
export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
'$state', 'ProcessErrors', 'CreateSelect2', '$q', 'JobTemplateModel',
'Empty', 'PromptService', 'Rest', 'TemplatesStrings',
'Empty', 'PromptService', 'Rest', 'TemplatesStrings', '$timeout',
function($scope, WorkflowService, GetBasePath, TemplatesService,
$state, ProcessErrors, CreateSelect2, $q, JobTemplate,
Empty, PromptService, Rest, TemplatesStrings) {
Empty, PromptService, Rest, TemplatesStrings, $timeout) {
let promptWatcher, surveyQuestionWatcher;
@ -808,7 +808,7 @@ export default ['$scope', 'WorkflowService', 'GetBasePath', 'TemplatesService',
break;
}
updateEdgeDropdownOptions(edgeDropdownOptions);
$timeout(updateEdgeDropdownOptions(edgeDropdownOptions));
$scope.$broadcast("refreshWorkflowChart");
};