Skip to content

Commit 408d7b6

Browse files
committed
fix(editor): syntax error fix -- thank you tests
1 parent 55b0538 commit 408d7b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/editor/src/editor.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,21 @@ export function enableEditor({ space, uiWrapper, config }) {
4040
}
4141

4242
const selected = editor.getSelected();
43-
4443
const isStep = selected.attributes.tagName === 'bolt-interactive-step';
4544
const isPathway =
4645
selected.attributes.tagName === 'bolt-interactive-pathway';
46+
4747
if (!(isPathway || isStep)) {
4848
// eslint-disable-next-line no-alert
4949
alert('"Move Up" and "Move Down" only work for Steps and Pathways');
5050
return;
5151
}
52+
5253
const parentCollection = selected.parent().components();
53-
if (!parentCollection.length > 1) {
54+
if (parentCollection.length <= 1) {
5455
return;
5556
}
57+
5658
const indexOfSelected = parentCollection.indexOf(selected);
5759
parentCollection.remove(selected);
5860
if (directionIsUp) {

0 commit comments

Comments
 (0)