page parameter is now set to 1 if not a number or smaller than 1

This commit is contained in:
Maurice Meyer 2016-06-06 10:13:34 +02:00
parent 00c9d15ac4
commit 4987c22671

View file

@ -20,8 +20,7 @@ var sort = {
}
$(document).ready(function() {
// When the site is loaded, always show the first page
requestData(1);
requestData();
$('#table-domains>thead>tr>td span').click(function() {
var field = $(this).siblings('strong').text().toLowerCase();
@ -55,6 +54,10 @@ $(document).ready(function() {
});
function requestData(page) {
if(typeof(page) !== 'number' || page <= 0) {
page = 1;
}
var restrictions = {
csrfToken: $('#csrfToken').text(),
};