From 9ac6dc8e8072d195b0fc30e2efcd81b7e9e08a9d Mon Sep 17 00:00:00 2001 From: Pranab Das <31024886+pranabdas@users.noreply.github.com> Date: Sat, 23 Mar 2024 12:23:33 +0800 Subject: [PATCH] SOF-7297: refactor ==> elementsWithLabelsArray --- src/context/providers/HubbardUContextProvider.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/context/providers/HubbardUContextProvider.js b/src/context/providers/HubbardUContextProvider.js index b7e5134..fb4d329 100644 --- a/src/context/providers/HubbardUContextProvider.js +++ b/src/context/providers/HubbardUContextProvider.js @@ -36,12 +36,7 @@ export class HubbardUContextProvider extends mix(JSONSchemaFormDataProvider).wit "7p", "7d", ]; - const _labels = this.material?.Basis?.atomicLabelsArray || []; - const _elements = this.material?.Basis?.elementsArray || []; - const _elementsWithLabels = []; - _elements.forEach((element, idx) => { - _elementsWithLabels.push(element + _labels[idx]); - }); + const _elementsWithLabels = this.material?.Basis?.elementsWithLabelsArray || []; this.uniqueElementsWithLabels = [...new Set(_elementsWithLabels)]; }