Skip to content

Commit

Permalink
Fixes issue with removing first workpad page (elastic#110495) (elasti…
Browse files Browse the repository at this point in the history
…c#111999)

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Corey Robertson <[email protected]>
  • Loading branch information
kibanamachine and Corey Robertson authored Sep 13, 2021
1 parent f0e25d5 commit e77e072
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 e77e072

Please sign in to comment.