Skip to content

Commit

Permalink
fix: assign isInitialized: true at the end of .initialize() method (t…
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken authored Dec 3, 2022
1 parent 73148c9 commit 81fc9a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/data-source/DataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ export class DataSource {
// connect to the cache-specific database if cache is enabled
if (this.queryResultCache) await this.queryResultCache.connect()

// set connected status for the current connection
ObjectUtils.assign(this, { isInitialized: true })

try {
// build all metadatas registered in the current connection
await this.buildMetadatas()
Expand All @@ -261,6 +258,9 @@ export class DataSource {
throw error
}

// set connected status for the current connection
ObjectUtils.assign(this, { isInitialized: true })

return this
}

Expand Down

0 comments on commit 81fc9a9

Please sign in to comment.