Avoid negative page values

This commit is contained in:
Bruce Leidl 2022-11-13 09:12:25 -05:00
parent a5e83b2d55
commit a48171ffd0

View File

@ -308,7 +308,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
}
_translatePreviousPageIcons(value, ltr) {
if (this._currentPage === 0)
if (this._currentPage <= 0)
return;
const previousPage = this._currentPage - 1;
@ -429,7 +429,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
}
goToPage(page, animate = true) {
if (this._currentPage === page)
if (this._currentPage === page || page < 0)
return;
this._currentPage = page;