Removed JS error on empty results

pull/22/head Drupal-7.x-1.15
Frode Petterson 2016-06-13 14:46:15 +02:00
parent b3c55928e3
commit ec2e0fbb71
1 changed files with 5 additions and 0 deletions

View File

@ -288,6 +288,11 @@ var H5PDataView = (function ($) {
var self = this; var self = this;
if (self.pagination === undefined) { if (self.pagination === undefined) {
if (self.table === undefined) {
// No table, no pagination
return;
}
// Create new widget // Create new widget
var $pagerContainer = $('<div/>', {'class': 'h5p-pagination'}); var $pagerContainer = $('<div/>', {'class': 'h5p-pagination'});
self.pagination = new H5PUtils.Pagination(num, self.limit, function (offset) { self.pagination = new H5PUtils.Pagination(num, self.limit, function (offset) {