Avoid negative page values
This commit is contained in:
parent
c7547aafa0
commit
e5148151c6
@ -327,7 +327,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
|
||||
}
|
||||
|
||||
_translatePreviousPageIcons(value, ltr) {
|
||||
if (this._currentPage === 0)
|
||||
if (this._currentPage <= 0)
|
||||
return;
|
||||
|
||||
const previousPage = this._currentPage - 1;
|
||||
@ -448,7 +448,7 @@ class BaseAppViewGridLayout extends Clutter.BinLayout {
|
||||
}
|
||||
|
||||
goToPage(page, animate = true) {
|
||||
if (this._currentPage === page)
|
||||
if (this._currentPage === page || page < 0)
|
||||
return;
|
||||
|
||||
this._currentPage = page;
|
||||
|
Loading…
Reference in New Issue
Block a user