1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fetch limit setting only once

This commit is contained in:
MrTimscampi 2020-04-03 22:40:16 +02:00
parent d9c9a05b09
commit 32a2df51a3

View file

@ -207,11 +207,12 @@ define(['appSettings', 'events'], function (appSettings, events) {
return this.set('libraryPageSize', parseInt(val, 10), false);
}
if (parseInt(this.get('libraryPageSize', false), 10) === 0) {
// Explicitely return 0 to avoid returning 100 because 0 is falsy.
var libraryPageSize = parseInt(this.get('libraryPageSize', false), 10);
if (libraryPageSize === 0) {
// Explicitly return 0 to avoid returning 100 because 0 is falsy.
return 0;
} else {
return parseInt(this.get('libraryPageSize', false), 10) || 100;
return libraryPageSize || 100;
}
};