浏览代码

HUE-2712 [oozie] Creating a fork can error

Romain Rigaux 10 年之前
父节点
当前提交
c188e98
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

+ 2 - 1
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -311,7 +311,8 @@ var Workflow = function (vm, workflow) {
 
             // In case of Fork of Fork, we need to pick the link of the neighbor of new node instead of just the first forkParent.get_link('to')
             var newParentLink = $.grep(forkParent.children(), function (link) {
-              return vm.getWidgetPredecessor(ko.mapping.toJS(link)['to']).id() == fork.id();
+              var _link = ko.mapping.toJS(link)
+              return 'to' in _link && vm.getWidgetPredecessor(_link['to']).id() == fork.id();
             })[0];
 
             var afterParentId = ko.mapping.toJS(newParentLink).to;