mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed the following SonarQube code smells:
1) Do not use Array index in keys. 2) Unnecessary escape character. 3) Rename this local variable to match the regular expression ^[_a-z][a-z0-9_]*$ 4) Remove the unused local variable.
This commit is contained in:
@@ -228,8 +228,6 @@ export function initialize(gettext, url_for, _, pgAdmin, csrfToken, Browser) {
|
||||
let db_label = '';
|
||||
if(pData.database && pData.database._id) {
|
||||
db_label = _.escape(pData.database._label.replace('\\', '\\\\'));
|
||||
db_label = db_label.replace('\'', '\'');
|
||||
db_label = db_label.replace('"', '\"');
|
||||
openUrl += `&db=${db_label}`;
|
||||
} else {
|
||||
openUrl += `&db=${''}`;
|
||||
|
Reference in New Issue
Block a user