This repository was archived by the owner on May 19, 2025. It is now read-only.

Description
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);
}
}