From be3931f0d6c82837be846f0a90f4e00661bc43e8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 19:42:58 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/AutocompleteVirtualized.js | 4 ++-- src/actions/index.js | 4 ++-- src/util.js | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/AutocompleteVirtualized.js b/src/AutocompleteVirtualized.js index b64b5075..bb8e0dff 100644 --- a/src/AutocompleteVirtualized.js +++ b/src/AutocompleteVirtualized.js @@ -262,8 +262,8 @@ export default function AutocompleteVirtualized(props) { result.text != null ? result.text : result.id != null - ? result.id - : result; + ? result.id + : result; textToOption.delete(text.toLowerCase()); }); tokens.forEach((token) => { diff --git a/src/actions/index.js b/src/actions/index.js index 70b3b76e..59bf4ef2 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -2425,8 +2425,8 @@ function getNewEmbeddingData(state, features) { embedding.spatial != null ? embedding.spatial.type : embedding.type - ? embedding.type - : TRACE_TYPE_SCATTER; + ? embedding.type + : TRACE_TYPE_SCATTER; let coordinates = traceType !== TRACE_TYPE_META_IMAGE ? cachedData[embeddingKey] : null; if (coordinates == null && embedding.mode != null) { diff --git a/src/util.js b/src/util.js index 04e20d8c..029b5b0a 100644 --- a/src/util.js +++ b/src/util.js @@ -680,10 +680,10 @@ export function rankdata(values) { return a.value < b.value ? -1 : a.value === b.value - ? a.position < b.position - ? -1 - : 1 - : 1; + ? a.position < b.position + ? -1 + : 1 + : 1; }); // Walk the sorted array, filling output array using sorted positions, @@ -722,20 +722,20 @@ function indexSortPairs(ranks, ascending) { return a.value < b.value ? -1 : a.value === b.value - ? a.position < b.position - ? -1 - : 1 - : 1; + ? a.position < b.position + ? -1 + : 1 + : 1; }); } else { ranks.sort(function (a, b) { return a.value < b.value ? 1 : a.value === b.value - ? a.position < b.position - ? 1 - : -1 - : -1; + ? a.position < b.position + ? 1 + : -1 + : -1; }); }