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

this.$databaseBind(...).then is not a function #1275

Closed
Todosiienko opened this issue Jan 5, 2023 · 0 comments
Closed

this.$databaseBind(...).then is not a function #1275

Todosiienko opened this issue Jan 5, 2023 · 0 comments
Labels

Comments

@Todosiienko
Copy link

Reproduction

https://codesandbox.io/s/strange-borg-y41d0u?file=/src/App.vue

Steps to reproduce the bug

Hi, i don`t know why i have this issue, because documentation says
"If you need to wait for a binding to be ready before doing something, you can await the returned Promise:"

this.$databaseBind('user', dbRef(users, this.id).then(user => {
  // user will be an object if this.user was set to anything but an array
  // and it will point to the same property declared in data:
  // this.user === user
})
this.$databaseBind('documents', `query(documents,` orderByChild('creator'), equalTo(this.id))).then(documents => {
  // documents will be an array if this.documents was initially set to an array
  // and it will point to the same property declared in data:
  // this.documents === documents
})

or if i do something wrong please explane me

Expected behavior

have abilty to use DataSnapshot in .then() from $databaseBind method

Actual behavior

When we try to use .then on $databaseBind we get an error this.$databaseBind(...).then is not a function

Additional information

No response

@posva posva added the bug label Jan 5, 2023 — with Volta.net
@posva posva closed this as completed in 4e6d32f Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants