Skip to content

fixes 4753 - #4826

Merged
pleerock merged 1 commit into
typeorm:masterfrom
elthrasher:issue-4753
Oct 13, 2019
Merged

pleerock merged 1 commit into
typeorm:masterfrom
elthrasher:issue-4753

Conversation

@elthrasher

Copy link
Copy Markdown
Contributor

This should fix #4753 and also provide a better way to actually get the database name.


// This database name property is nested for replication configs.
protected getDatabaseName(): string {
const options = this.options;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const {replication, database} = this.options;
// ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes an issue with the typeguard. I can't be sure this.options contains replication until after the guard. I was trying to avoid the use of any. I like destructuring, but don't think it's worth the cost here.

@pleerock

Copy link
Copy Markdown
Member

Thanks @elthrasher so much!

@pleerock
pleerock merged commit df5479b into typeorm:master Oct 13, 2019
@elthrasher
elthrasher deleted the issue-4753 branch October 13, 2019 18:08
@pleerock pleerock mentioned this pull request Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants