We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bb410e commit 87877a5Copy full SHA for 87877a5
src/EditorControls.js
@@ -290,8 +290,8 @@ class EditorControls extends Component {
290
break;
291
292
case EDITOR_ACTIONS.MOVE_TO:
293
- // checking is fromIndex and toIndex is a number because just checking
294
- // if not there will not work as index can be 0 and that value is falsy
+ // checking if fromIndex and toIndex is a number because
+ // gives errors if index is 0 (falsy value)
295
if (payload.path && !isNaN(payload.fromIndex) && !isNaN(payload.toIndex)) {
296
function move(container) {
297
const movedEl = container[payload.fromIndex];
0 commit comments