1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

pr review: clear: operators precedence

This commit is contained in:
Tim Daubenschütz 2015-08-04 16:58:36 +02:00
parent c4e372e72f
commit 23bbbb792a

View File

@ -18,13 +18,13 @@ class EditionListActions {
}
fetchEditionList(pieceId, page, pageSize, orderBy, orderAsc, filterBy) {
if(!orderBy && typeof orderAsc === 'undefined' || !orderAsc) {
if((!orderBy && typeof orderAsc === 'undefined') || !orderAsc) {
orderBy = 'edition_number';
orderAsc = true;
}
// Taken from: http://stackoverflow.com/a/519157/1263876
if(typeof page === 'undefined' || !page && typeof pageSize === 'undefined' || !pageSize) {
if((typeof page === 'undefined' || !page) && (typeof pageSize === 'undefined' || !pageSize)) {
page = 1;
pageSize = 10;
}