Fixes issue with removing first workpad page (#110495)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Corey Robertson 2021-09-13 13:18:25 -04:00 committed by GitHub
parent 835e88986c
commit edc147b6f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {