File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -773,7 +773,6 @@ export class PersistentConnection extends ServerActions {
773773 const onReady = this . onReady_ . bind ( this ) ;
774774 const onDisconnect = this . onRealtimeDisconnect_ . bind ( this ) ;
775775 const connId = this . id + ':' + PersistentConnection . nextConnectionId_ ++ ;
776- const self = this ;
777776 const lastSessionId = this . lastSessionId ;
778777 let canceled = false ;
779778 let connection : Connection | null = null ;
@@ -807,17 +806,17 @@ export class PersistentConnection extends ServerActions {
807806 . then ( result => {
808807 if ( ! canceled ) {
809808 log ( 'getToken() completed. Creating connection.' ) ;
810- self . authToken_ = result && result . accessToken ;
809+ this . authToken_ = result && result . accessToken ;
811810 connection = new Connection (
812811 connId ,
813- self . repoInfo_ ,
814- self . applicationId_ ,
812+ this . repoInfo_ ,
813+ this . applicationId_ ,
815814 onDataMessage ,
816815 onReady ,
817816 onDisconnect ,
818817 /* onKill= */ reason => {
819- warn ( reason + ' (' + self . repoInfo_ . toString ( ) + ')' ) ;
820- self . interrupt ( SERVER_KILL_INTERRUPT_REASON ) ;
818+ warn ( reason + ' (' + this . repoInfo_ . toString ( ) + ')' ) ;
819+ this . interrupt ( SERVER_KILL_INTERRUPT_REASON ) ;
821820 } ,
822821 lastSessionId
823822 ) ;
@@ -826,7 +825,7 @@ export class PersistentConnection extends ServerActions {
826825 }
827826 } )
828827 . then ( null , error => {
829- self . log_ ( 'Failed to get token: ' + error ) ;
828+ this . log_ ( 'Failed to get token: ' + error ) ;
830829 if ( ! canceled ) {
831830 if ( this . repoInfo_ . nodeAdmin ) {
832831 // This may be a critical error for the Admin Node.js SDK, so log a warning.
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ export class FirebaseDatabase implements _FirebaseService {
217217
218218 /** @hideconstructor */
219219 constructor (
220- private _repoInternal : Repo ,
220+ public _repoInternal : Repo ,
221221 /** The FirebaseApp associated with this Realtime Database instance. */
222222 readonly app : FirebaseApp
223223 ) { }
@@ -300,7 +300,7 @@ export function useDatabaseEmulator(
300300 ) ;
301301 }
302302 // Modify the repo to apply emulator settings
303- repoManagerApplyEmulatorSettings ( db . _repo , host , port ) ;
303+ repoManagerApplyEmulatorSettings ( db . _repoInternal , host , port ) ;
304304}
305305
306306/**
You can’t perform that action at this time.
0 commit comments