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:
parent
c4e372e72f
commit
23bbbb792a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user