emberfire
emberfire copied to clipboard
Emberfire v3 bug in the firestore adapter
In case there are multiple orderBy clauses, startAt, startAfter, endAt and endBefore query methods expect spread of values, not array of values. You should change this:
if (options.endBefore) {
ref = ref.endBefore(options.endBefore);
}
to something this:
if (options.endBefore) {
if (Array.isArray(options.endBefore)) {
ref = ref.endBefore(...options.endBefore);
} else {
ref = ref.endBefore(options.endBefore);
}
}