Skip to content

Commit d9a4e78

Browse files
Update src/index.ts
Co-authored-by: Jacob Gillespie <jacobwgillespie@gmail.com>
1 parent 586d6b8 commit d9a4e78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class PlanetScaleConnection implements DatabaseConnection {
120120
constructor(client: Client, useSharedConnection = false, isForTransaction = false) {
121121
this.#client = client
122122
this.#useSharedConnection = useSharedConnection && !isForTransaction
123-
if (this.#useSharedConnection) sharedConnections.set(this.#config, this.#client.connection())
123+
if (this.#useSharedConnection) sharedConnections.set(this.#config, sharedConnections.get(this.#config) ?? this.#client.connection())
124124
}
125125

126126
async executeQuery<O>(compiledQuery: CompiledQuery): Promise<QueryResult<O>> {

0 commit comments

Comments
 (0)