Skip to content

Commit

Permalink
fix: sonarqube issues
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiaifrim committed Nov 22, 2023
1 parent aca51b4 commit e988d2e
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ class Edit extends Component {

if (!provider_data) return schema;

const choices = Array.from(Object.keys(provider_data).sort()).map((n) => [
n,
n,
]);
const choices = Array.from(
Object.keys(provider_data).sort((a, b) => a.localeCompare(b)),
).map((n) => [n, n]);

schema.properties.columns.schema.properties.column.choices = choices;
schema.properties.columns.schema.properties.column_link.choices = choices;
Expand All @@ -52,11 +51,15 @@ class Edit extends Component {
: '';

const mapChoices = map_provider_data
? Array.from(Object.keys(map_provider_data).sort()).map((n) => [n, n])
? Array.from(
Object.keys(map_provider_data).sort((a, b) => a.localeCompare(b)),
).map((n) => [n, n])
: [];

const tableChoices = table_provider_data
? Array.from(Object.keys(table_provider_data).sort()).map((n) => [n, n])
? Array.from(
Object.keys(table_provider_data).sort((a, b) => a.localeCompare(b)),
).map((n) => [n, n])
: [];
schema.properties.popup_data_query.choices = choices;

Expand Down

0 comments on commit e988d2e

Please sign in to comment.