Skip to content

Commit

Permalink
Merge pull request #60 from Exabyte-io/hotfix/SOF-7175
Browse files Browse the repository at this point in the history
SOF-7175: fix default atomicSpecies data in Hubbard_U context provider
  • Loading branch information
timurbazhirov authored Dec 19, 2023
2 parents 4e9e1dd + 1b17335 commit 06e045f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/context/providers/HubbardContextProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ export class HubbardContextProvider extends mix(JSONSchemaFormDataProvider).with
}

get defaultData() {
return [{ ...defaultHubbardConfig, atomicSpecies: this.uniqueElements }];
return [
{
...defaultHubbardConfig,
atomicSpecies: this.uniqueElements?.length > 0 ? this.uniqueElements[0] : "",
},
];
}

get uiSchemaStyled() {
Expand Down

0 comments on commit 06e045f

Please sign in to comment.