mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixes following code smell reported by SonarQube:
1) Replace this if-then-else flow by a single return statement 2) Remove the unnecessary boolean literals.
This commit is contained in:
@@ -194,9 +194,7 @@ export function getSaveOptSchema(fieldOptions) {
|
||||
}
|
||||
|
||||
function isVisible () {
|
||||
if (!_.isUndefined(this.backupType) && this.backupType === 'server')
|
||||
return false;
|
||||
return true;
|
||||
return !(!_.isUndefined(this.backupType) && this.backupType === 'server');
|
||||
}
|
||||
|
||||
export class QueryOptionSchema extends BaseUISchema {
|
||||
@@ -240,9 +238,7 @@ export class QueryOptionSchema extends BaseUISchema {
|
||||
disabled: false,
|
||||
group: gettext('Queries'),
|
||||
visible: function() {
|
||||
if (!_.isUndefined(obj.backupType) && obj.backupType === 'server')
|
||||
return false;
|
||||
return true;
|
||||
return !(!_.isUndefined(obj.backupType) && obj.backupType === 'server');
|
||||
},
|
||||
}, {
|
||||
id: 'include_drop_database',
|
||||
|
||||
Reference in New Issue
Block a user