Sort type can change. Removed falsey check.

This commit is contained in:
Mel O'Hagan 2022-09-23 09:30:05 +01:00
parent b29dadb285
commit 25ef6599e6
1 changed files with 5 additions and 7 deletions

View File

@ -136,14 +136,12 @@ export default class DataFetch {
} }
// Determine what sort type to use // Determine what sort type to use
if (!this.options.sortType) { let sortType = "string"
let sortType = "string" if (sortColumn) {
if (sortColumn) { const type = schema?.[sortColumn]?.type
const type = schema?.[sortColumn]?.type sortType = type === "number" ? "number" : "string"
sortType = type === "number" ? "number" : "string"
}
this.options.sortType = sortType
} }
this.options.sortType = sortType
// Build the lucene query // Build the lucene query
let query = this.options.query let query = this.options.query