Categories
How to write in one line?
const currentSorting = location.query.sort_direction || pageContents.books.default_sort[activeList]; const sort_direction = currentSorting === 'desc' ? 'desc' : 'asc';
Answer the question
In order to leave comments, you need to log in
const sort_direction = location.query.sort_direction ? location.query.sort_direction : pageContents.books.default_sort[activeList];
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question