Skip to content

Commit 81fc9a9

Browse files
authored
fix: assign isInitialized: true at the end of .initialize() method (typeorm#9455)
1 parent 73148c9 commit 81fc9a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/data-source/DataSource.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ export class DataSource {
234234
// connect to the cache-specific database if cache is enabled
235235
if (this.queryResultCache) await this.queryResultCache.connect()
236236

237-
// set connected status for the current connection
238-
ObjectUtils.assign(this, { isInitialized: true })
239-
240237
try {
241238
// build all metadatas registered in the current connection
242239
await this.buildMetadatas()
@@ -261,6 +258,9 @@ export class DataSource {
261258
throw error
262259
}
263260

261+
// set connected status for the current connection
262+
ObjectUtils.assign(this, { isInitialized: true })
263+
264264
return this
265265
}
266266

0 commit comments

Comments
 (0)