emberfire icon indicating copy to clipboard operation
emberfire copied to clipboard

Emberfire v3 bug in the firestore adapter

Open maxymczech opened this issue 5 years ago • 0 comments

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

maxymczech avatar May 28 '20 14:05 maxymczech