Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Fix dnd tab reordering issue (#8888)
Browse files Browse the repository at this point in the history
* Fix dnd tab reordering issue
Auditors: @bsclifton
Fix #8887

* Fix error which happens during tab drag and drop

Auditors: @cezaraugusto, @NejcZdovc
  • Loading branch information
cezaraugusto authored and bsclifton committed May 16, 2017
1 parent e01b081 commit b872523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ const doAction = (action) => {
{
const sourceFrameProps = frameStateUtil.getFrameByKey(windowState, action.sourceFrameKey)
const sourceFrameIndex = frameStateUtil.getFrameIndex(windowState, action.sourceFrameKey)
let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameProps.get('key')) + (action.prepend ? 0 : 1)
let newIndex = frameStateUtil.getFrameIndex(windowState, action.destinationFrameKey) + (action.prepend ? 0 : 1)
let frames = frameStateUtil.getFrames(windowState).splice(sourceFrameIndex, 1)
if (newIndex > sourceFrameIndex) {
newIndex--
Expand Down

0 comments on commit b872523

Please sign in to comment.