Prevent JS error when no pager is available

pull/42/head
Frode Petterson 2017-08-04 11:04:10 +02:00
parent 0dddbf654e
commit f112f761c3
1 changed files with 4 additions and 0 deletions

View File

@ -188,6 +188,10 @@ var H5PLibraryDetails= H5PLibraryDetails || {};
* Update the pager text, and enables/disables the next and previous buttons as needed
*/
H5PLibraryDetails.updatePager = function () {
if (!H5PLibraryDetails.$pagerInfo) {
return; // No pager available
}
H5PLibraryDetails.$pagerInfo.css({display: 'inline-block'});
if(H5PLibraryDetails.getNumPages() > 0) {