Skip to content

Commit

Permalink
chore: Code cleanup in DatabaseModal (#14196)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams authored Apr 21, 2021
1 parent 2dd20df commit 70cfb77
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
}

const connection = {
sqlalchemy_uri: db ? db.sqlalchemy_uri : '',
sqlalchemy_uri: db?.sqlalchemy_uri || '',
database_name: db?.database_name?.trim() || undefined,
impersonate_user: db?.impersonate_user || undefined,
extra: db?.extra || undefined,
Expand Down Expand Up @@ -120,7 +120,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
delete update.id;
}

if (db && db.id) {
if (db?.id) {
updateResource(db.id, update).then(result => {
if (result) {
if (onDatabaseAdd) {
Expand Down

0 comments on commit 70cfb77

Please sign in to comment.