Skip to content

Commit

Permalink
Add empty actions message to container
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed Jun 25, 2023
1 parent 38a32ac commit ef20540
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ export class ShortcutPreview {
preview.appendChild(header);
}

container = document.createElement('div');
container.className = 'sp-container ios';
if (this.data.WFWorkflowActions && this.data.WFWorkflowActions.length !== 0) {
container = document.createElement('div');
container.className = 'sp-container ios';
renderShortcut(this.data.WFWorkflowActions);
preview.appendChild(container);
} else {
const empty = document.createElement('div');
empty.className = 'sp-actions-empty';
empty.innerText = 'This Shortcut contains 0 actions.';
preview.appendChild(empty);
container.appendChild(empty);
}
preview.appendChild(container);
}
}

0 comments on commit ef20540

Please sign in to comment.