Reputation: 3310
Error getValue() is not a function.
According to the documentation I've read snapshot.getValue()
should return the value with out the key.
I do the following:
firebase.attendanceNotes(props.orgId, props.data.uid)
.limitToLast(1)
.once('value')
.then(returnedNotes => {
console.log(returnedNotes.getValue());
})
This kicks out the error I mentioned above. What am I doing wrong?
Upvotes: 0
Views: 124
Reputation: 3067
Your code looks like it's JavaScript.
getValue()
is for Java. In JavaScript it's val()
.
Upvotes: 2