Null check
This commit is contained in:
parent
86d0c4086b
commit
5d96e0e787
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class PostList extends AbstractList {
|
|||
|
||||
static search(text, offset, limit, fields) {
|
||||
//For queries with random sorting, bypass cache by appending random number
|
||||
let cache = text.includes('sort:random')
|
||||
let cache = text != null && text.includes('sort:random')
|
||||
? Math.round(Math.random() * 1000)
|
||||
: 0;
|
||||
return api.get(
|
||||
|
|
Reference in a new issue