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 Mar 29, 2022. It is now read-only.
Using a value listener on a node that's being removed triggers the callback twice. The first time with an empty snapshot and a second time with the pre-deletion snapshot.
varFirebaseServer=require('firebase-server');vars=newFirebaseServer(5000,'dummy.firebaseio.test',{states: {CA: 'California',AL: 'Alabama',KY: 'Kentucky'}});varFirebase=require('firebase');varclient=newFirebase('ws://dummy.firebaseio.test:5000');// Attaching a value listener to states/CAclient.child('states').child('CA').on('value',function(snap){console.log('Value: '+snap.val());});// After 1 second, remove states/CAsetTimeout(function(){console.log('Removing CA');client.child('states').child('CA').remove();},1000);
Output:
Value: California
Removing CA
Value: null
Value: California
The text was updated successfully, but these errors were encountered:
Using a value listener on a node that's being removed triggers the callback twice. The first time with an empty snapshot and a second time with the pre-deletion snapshot.
Output:
The text was updated successfully, but these errors were encountered: