You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 12, 2019. It is now read-only.
this.getRequested = function (uid) {
var ref = new Firebase(FBURL);
var refSearch = ref.child('profiles/' + uid + '/friends/requested');
///*
var refSearch = new Firebase.util.NormalizedCollection(
[ref.child('profiles/' + uid + '/friends/requested'), "frId"],
[ref.child('users'), 'users', 'frId.username']
).select('frId.username', 'frId.status', 'users.img', 'users.uid').ref();
//*/
return $firebaseArray(refSearch);
}
After binding this to a $scope variable: $scope.frRequested = Friends.getRequested(authData.uid);
Now if I remove a record as follows: $scope.frRequested.$remove(friend);
I get the following WARNING:
FIREBASE WARNING: Exception was thrown by user callback. TypeError: Cannot read property 'ref' of null
at Object.i.update (https://cdn.firebase.com/libs/firebase-util/0.2.5/firebase-util.min.js:9:22050)
at https://cdn.firebase.com/libs/firebase-util/0.2.5/firebase-util.min.js:9:18061
at https://cdn.firebase.com/js/client/2.4.2/firebase.js:203:710
at gc (https://cdn.firebase.com/js/client/2.4.2/firebase.js:52:165)
at cc (https://cdn.firebase.com/js/client/2.4.2/firebase.js:30:216)
at dc (https://cdn.firebase.com/js/client/2.4.2/firebase.js:29:1259)
at Ji.h.Ob (https://cdn.firebase.com/js/client/2.4.2/firebase.js:223:440)
at X.set (https://cdn.firebase.com/js/client/2.4.2/firebase.js:259:335)
at X.remove (https://cdn.firebase.com/js/client/2.4.2/firebase.js:262:146)
at https://cdn.firebase.com/libs/firebase-util/0.2.5/firebase-util.min.js:9:19948
firebase.js:52 Uncaught TypeError: Cannot read property 'ref' of null
I have tried a similar situation without using the NormalizedCollection, and everything works fine, i.e. when the service is as follow, it works without a problem:
this.getRequested = function (uid) {
var ref = new Firebase(FBURL);
var refSearch = ref.child('profiles/' + uid + '/friends/requested');
return $firebaseArray(refSearch);
}
I have a
servicewith the following function:After binding this to a $scope variable:
$scope.frRequested = Friends.getRequested(authData.uid);Now if I remove a record as follows:
$scope.frRequested.$remove(friend);I get the following WARNING:
I have tried a similar situation without using the NormalizedCollection, and everything works fine, i.e. when the service is as follow, it works without a problem:
Is this a bug?