Skip to content

Commit

Permalink
Merge pull request #742 from tadast/tt/db-fix
Browse files Browse the repository at this point in the history
Prevent infinite loop when selecting a sole database
  • Loading branch information
yannickwurm committed May 14, 2024
2 parents 9faa2c4 + 7b32cb2 commit 7233794
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/js/databases.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Databases extends Component {

componentDidUpdate(_prevProps, prevState) {
// If there's only one database, select it.
if (this.databases() && this.databases().length === 1) {
if (this.databases() && this.databases().length === 1 && this.state.currentlySelectedDatabases.length === 0) {
this.setState({currentlySelectedDatabases: this.databases()});
}

Expand Down
Loading

0 comments on commit 7233794

Please sign in to comment.