Commit 66268c65 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

chnage page if the number of pages is lower then current page

parent 96db0b08
Pipeline #37444 passed with stage
in 31 minutes and 56 seconds
......@@ -15,6 +15,8 @@ minerva (16.0.0~alpha.1) stable; urgency=medium
(#1376)
* Small improvement: context menu exporting map is more precise about scope
(#1447)
* Bug fix: refreshing page after removing last project on the page redirect to
proper page (#1051)
* Bug fix: removing plugin that does not exist anymore does not raise an error
(#1289)
* Bug fix: broken overlays crashed minerva upgrade (#1453)
......
......@@ -335,7 +335,10 @@ MapsAdminPanel.prototype.setProjects = function (projects) {
}
//it should be simplified, but I couldn't make it work
dataTable.clear().rows.add(data).page(page).draw(false).page(page).draw(false);
if (page >= dataTable.page.info().pages) {
page = dataTable.page.info().pages - 1;
dataTable.page(page).draw(false)
}
});
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment