Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emberfire v3 bug in the firestore adapter #613

Open
maxymczech opened this issue May 28, 2020 · 0 comments
Open

Emberfire v3 bug in the firestore adapter #613

maxymczech opened this issue May 28, 2020 · 0 comments

Comments

@maxymczech
Copy link
Contributor

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);
      }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant