Skip to content

Commit

Permalink
Fix issues with indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed Nov 24, 2023
1 parent 6042761 commit 961d7df
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export const controlFlowStart = 0;
export const controlFlowItem = 1;
export const controlFlowEnd = 2;

let insideGroup = false;

export function renderShortcut(shortcutActions: Array<ActionData>) {
console.group('Render Shortcut');
for (const action of shortcutActions) {
Expand All @@ -18,7 +20,13 @@ export function renderShortcut(shortcutActions: Array<ActionData>) {

// @ts-ignore
if (params['WFControlFlowMode'] === controlFlowEnd || params['WFControlFlowMode'] === controlFlowItem) {
prevContainer();
// @ts-ignore
if (params['WFControlFlowMode'] === controlFlowEnd) {
insideGroup = false;
}
if (!insideGroup) {
prevContainer();
}
}

container.appendChild(
Expand All @@ -27,6 +35,14 @@ export function renderShortcut(shortcutActions: Array<ActionData>) {

// @ts-ignore
if (params['WFControlFlowMode'] === controlFlowStart || params['WFControlFlowMode'] === controlFlowItem) {
// @ts-ignore
if (params['WFControlFlowMode'] === controlFlowStart && identifier === 'choosefrommenu') {
continue;
}
// @ts-ignore
if (params['WFControlFlowMode'] === controlFlowStart) {
insideGroup = true;
}
newContainer();
}
}
Expand Down

0 comments on commit 961d7df

Please sign in to comment.