mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed some sonarqube issues.
This commit is contained in:
@@ -7,9 +7,6 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
//import * as commonUtils from '../../../static/js/utils';
|
||||
//import Mousetrap from 'mousetrap';
|
||||
|
||||
define([
|
||||
'sources/gettext', 'jquery', 'underscore', 'sources/pgadmin',
|
||||
'backbone', 'alertify', 'backform', 'backgrid', 'sources/browser/generate_url',
|
||||
@@ -357,7 +354,7 @@ define([
|
||||
msg = undefined,
|
||||
title = undefined;
|
||||
|
||||
if (sel_node.type && sel_node.type == 'coll-constraints') {
|
||||
if (sel_node && sel_node.type && sel_node.type == 'coll-constraints') {
|
||||
// In order to identify the constraint type, the type should be passed to the server
|
||||
sel_rows = sel_row_models.map(row => ({id: row.get('oid'), _type: row.get('_type')}));
|
||||
}
|
||||
@@ -372,6 +369,9 @@ define([
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sel_node)
|
||||
return;
|
||||
|
||||
if (type === 'dropCascade') {
|
||||
url = sel_node.generate_url(sel_item, 'delete');
|
||||
msg = gettext('Are you sure you want to drop all the selected objects and all the objects that depend on them?');
|
||||
|
||||
Reference in New Issue
Block a user