mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed SonarQube issues.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
define([], function() {
|
||||
var pgAdmin = window.pgAdmin = window.pgAdmin || {};
|
||||
let pgAdmin = window.pgAdmin = window.pgAdmin || {};
|
||||
|
||||
// Reference:
|
||||
// https://github.com/heygrady/Units/blob/master/Length.min.js
|
||||
@@ -57,7 +57,7 @@ define([], function() {
|
||||
else('auto' === _o || _i && 'px' !== _i) && m ? _o = 0 : _i && 'px' !== _i && !m && (_o = r(_t, _o) + 'px');
|
||||
return _o;
|
||||
}
|
||||
var p, n = e.createElement('test'),
|
||||
let p, n = e.createElement('test'),
|
||||
i = e.documentElement,
|
||||
l = e.defaultView,
|
||||
m = l && l.getComputedStyle,
|
||||
@@ -76,7 +76,7 @@ define([], function() {
|
||||
pgAdmin.natural_sort = function(a, b, options) {
|
||||
options = options || {};
|
||||
|
||||
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,
|
||||
let re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,
|
||||
sre = /(^[ ]*|[ ]*$)/g,
|
||||
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
|
||||
hre = /^0x[0-9a-f]+$/i,
|
||||
@@ -102,7 +102,7 @@ define([], function() {
|
||||
else if (xD > yD) return 1 * mult;
|
||||
|
||||
// natural sorting through split numeric strings and default strings
|
||||
for (var cLoc = 0, numS = Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
|
||||
for (let cLoc = 0, numS = Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
|
||||
// find floats not starting with '0', string or 0 if not defined (Clint Priest)
|
||||
oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;
|
||||
oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;
|
||||
|
||||
Reference in New Issue
Block a user