Skip to content

Commit

Permalink
SOF-6927: fix regex match expression to extract atomic label
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Mar 6, 2024
1 parent a6c4595 commit b0350a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context/providers/espresso/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class QEPWXContextProvider extends mix(ExecutableContextProvider).with(
return QEPWXContextProvider.atomSymbolsWithLabels(material)
.map((symbol) => {
const symbolWithoutLabel = symbol.replace(/\d$/, "");
const label = symbol.match(/\d$/g)[0] ? symbol.match(/\d$/g)[0] : "";
const label = symbol.match(/\d$/g) ? symbol.match(/\d$/g)[0] : "";
const pseudo = this.getPseudoBySymbol(symbolWithoutLabel);
return QEPWXContextProvider.symbolToAtomicSpecieWithLabels(
symbolWithoutLabel,
Expand Down

0 comments on commit b0350a6

Please sign in to comment.