beta-glozic-workflow 1.32.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -89,9 +89,10 @@ class Designer extends _react.Component {
|
|
|
89
89
|
if (action.configuration && action.configuration.actionID === targetActionID) {
|
|
90
90
|
// Update branches array when actionID matches
|
|
91
91
|
var tempBranch = action.branches;
|
|
92
|
-
if (tempBranch.length
|
|
93
|
-
tempBranch = tempBranch.
|
|
94
|
-
}
|
|
92
|
+
if (tempBranch.length >= newBranches.length) {
|
|
93
|
+
tempBranch = tempBranch.filter(branch => newBranches.some(newBranch => newBranch.label === branch.name));
|
|
94
|
+
}
|
|
95
|
+
if (tempBranch.length <= newBranches.length) {
|
|
95
96
|
newBranches.forEach((ele, index) => {
|
|
96
97
|
if (!tempBranch[index]) {
|
|
97
98
|
tempBranch.push({
|
|
@@ -1991,7 +1992,8 @@ class Designer extends _react.Component {
|
|
|
1991
1992
|
let endBranchId = "node-botbranch_".concat(i, "-").concat(self.nodes[node].count);
|
|
1992
1993
|
newData[i] = [];
|
|
1993
1994
|
let curBranch = Object.assign({}, this.nodes[node].branches[i], {
|
|
1994
|
-
actions: []
|
|
1995
|
+
actions: [],
|
|
1996
|
+
name: "branch".concat(i)
|
|
1995
1997
|
});
|
|
1996
1998
|
while (cNode !== endBranchId) {
|
|
1997
1999
|
//console.log('ele in branch ', cNode, this.nodes[cNode])
|