File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
packages/neo4j-driver-deno/lib/core Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ class ConnectionProvider {
110
110
throw Error ( 'Not implemented' )
111
111
}
112
112
113
- ensureFreshRoutingTable ( param ?: { database ?: string , accessMode ?: string } ) : Promise < void > {
113
+ ensureFreshRoutingTable ( param ?: { database ?: string , accessMode ?: string } ) : Promise < void > {
114
114
throw Error ( 'Not implemented' )
115
115
}
116
116
Original file line number Diff line number Diff line change @@ -868,9 +868,9 @@ class Driver {
868
868
} ) : Session {
869
869
const sessionMode = Session . _validateSessionMode ( defaultAccessMode )
870
870
const connectionProvider = this . _getOrCreateConnectionProvider ( )
871
- const homeDatabase = this . homeDatabaseCache . get ( impersonatedUser ?? auth ?. principal ?? "" )
872
- if ( homeDatabase !== undefined && homeDatabase !== "" ) {
873
- void connectionProvider . ensureFreshRoutingTable ( { database : homeDatabase } )
871
+ const homeDatabase = this . homeDatabaseCache . get ( impersonatedUser ?? auth ?. principal ?? '' )
872
+ if ( homeDatabase !== undefined && homeDatabase !== '' ) {
873
+ void connectionProvider . ensureFreshRoutingTable ( { database : homeDatabase } )
874
874
}
875
875
const bookmarks = bookmarkOrBookmarks != null
876
876
? new Bookmarks ( bookmarkOrBookmarks )
@@ -893,7 +893,7 @@ class Driver {
893
893
} )
894
894
}
895
895
896
- _homeDatabaseCallback ( user : string , databaseName : string ) : void {
896
+ _homeDatabaseCallback ( user : string , databaseName : string ) : void {
897
897
this . homeDatabaseCache . set ( user , databaseName )
898
898
}
899
899
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class Session {
74
74
private readonly _bookmarkManager ?: BookmarkManager
75
75
private readonly _notificationFilter ?: NotificationFilter
76
76
private readonly _log : Logger
77
- private _homeDatabaseCallback : Function | undefined
77
+ private readonly _homeDatabaseCallback : Function | undefined
78
78
private readonly _auth : AuthToken | undefined
79
79
/**
80
80
* @constructor
@@ -517,7 +517,7 @@ class Session {
517
517
if ( ! this . _databaseNameResolved ) {
518
518
const normalizedDatabase = database ?? ''
519
519
this . _database = normalizedDatabase
520
- if ( this . _homeDatabaseCallback ) {
520
+ if ( this . _homeDatabaseCallback != null ) {
521
521
this . _homeDatabaseCallback ( this . _impersonatedUser ?? this . _auth ?. principal , normalizedDatabase )
522
522
}
523
523
this . _readConnectionHolder . setDatabase ( normalizedDatabase )
You can’t perform that action at this time.
0 commit comments