Skip to content

Instantly share code, notes, and snippets.

@pwmckenna
Last active December 16, 2015 10:58
Show Gist options
  • Save pwmckenna/5423834 to your computer and use it in GitHub Desktop.
Save pwmckenna/5423834 to your computer and use it in GitHub Desktop.
firebase node bug
/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:95
is.o===m)&&nd(a)}};function Ed(a,b,c,d,e){for(var g=a.get(b),h=o,i=g.ma.length
^
TypeError: Cannot read property 'ma' of undefined
at Ed (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:95:211)
at Fd (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:96:88)
at Bd.hc (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:95:458)
at Ld.r.hc (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:108:258)
at G.Ub (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:13:136)
at /Users/pwmckenna/git/todium-stats/lib/todium-tracker.js:12:31
at id (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:81:441)
at md (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:82:382)
at jd.dc (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:81:904)
at Bd.dc (/Users/pwmckenna/git/todium-stats/node_modules/firebase/lib/firebase-node.js:97:472)
//WAS RUNNING THIS CODE
var Firebase = require('firebase');
var firebase = new Firebase('https://todium.firebaseio.com/');
var selector = firebase.child('trackers').child('bc7e7c9658546aaba6e43a3700141f7a89546db4').child('stats').child('started');
selector.startAt().limit(1).on('child_added', function () {
console.log('start off');
selector.startAt().limit(1).off('child_added');
});
selector.endAt().limit(100).on('child_added', function () {
console.log('end off');
selector.endAt().limit(1).off('child_added');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment