Skip to content

Commit

Permalink
Fixes issue with removing first workpad page (#110495)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Corey Robertson and kibanamachine authored Sep 13, 2021
1 parent 835e889 commit edc147b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/public/state/reducers/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const pagesReducer = handleActions(
newState = addPage(newState);
}

if (wasOnlyPage) {
if (wasOnlyPage || curIndex === 0) {
newState = set(newState, 'page', 0);
gotoPage(1);
} else if (wasSelected || delIndex < curIndex) {
Expand Down

0 comments on commit edc147b

Please sign in to comment.