Fixed sort to work properly. Previously did not always sort correctly in IE/Edge. (#494)
This commit is contained in:
parent
3499fe91cc
commit
cfa111bbad
|
@ -19,7 +19,7 @@ export class CamlQueryHelper {
|
||||||
|
|
||||||
// Generates the <Where /> part
|
// Generates the <Where /> part
|
||||||
if(querySettings.filters && !isEmpty(querySettings.filters)) {
|
if(querySettings.filters && !isEmpty(querySettings.filters)) {
|
||||||
let sortedFilters = querySettings.filters.sort((a, b) => { if(a.index > b.index) { return 1; } else { return 0; } });
|
let sortedFilters = querySettings.filters.sort((a, b) => { return a.index - b.index; });
|
||||||
query += Text.format('<Where>{0}</Where>', this.generateFilters(sortedFilters));
|
query += Text.format('<Where>{0}</Where>', this.generateFilters(sortedFilters));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue