Skip to content

Commit

Permalink
chore: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
seankwarren committed Jun 14, 2023
1 parent fbd3342 commit 50a4972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function setUnitsHead(units) {
export function setNextLinks(units) {
const flowchartIds = units.map((u) => u.flowchartId);
for (let i = 0; i < units.length - 1; i++) {
if (!units[i].next || units[i].next !== units[i + 1].flowchartId) {
if (!units[i].next) {
console.log("wode is updated!");
// newly added units don't have next set yet => set it
units[i].next = units[i + 1].flowchartId;
if (i > 0) units[i - 1].next = units[i].flowchartId;
Expand Down

0 comments on commit 50a4972

Please sign in to comment.