Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client-side exception in reaction template picker #1405

Closed
daanboer opened this issue Oct 8, 2024 · 0 comments · Fixed by #1618
Closed

Client-side exception in reaction template picker #1405

daanboer opened this issue Oct 8, 2024 · 0 comments · Fixed by #1618
Labels
application bug Something isn't working

Comments

@daanboer
Copy link
Contributor

daanboer commented Oct 8, 2024

To reproduce:

  1. Go to https://demo.lxcat.net/scat-cs.
  2. Select a contributor under "Set selection".
  3. Select any species on the left- or right-hand side.
  4. Deselect the previously selected contributor.

The result is a client-side exception with the message: TypeError: s[t] is undefined. This is rather nondescript, as the code is minified. The same error in a dev environment reads: Uncaught TypeError: data[particle] is undefined. The error originates in the StateSelect component:

const electronicEntries = particle && particle !== OMIT_CHILDREN_KEY
? data[particle].children
: undefined;

Logging data and particle reveals the problem. As the referenced key on the particle level does not exist in the returned dictionary:

data:

{
  'State/907217': { latex: '\\mathrm{e}^-', valid: true, children: {} },
  'State/907496': {
    latex: '\\mathrm{CO}',
    valid: false,
    children: { 'State/907501': [Object] }
  },
  'State/908288': {
    latex: '\\mathrm{CO_{2}}',
    valid: false,
    children: { 'State/908293': [Object] }
  },
  'State/912125': {
    latex: '\\mathrm{N_{2}}',
    valid: false,
    children: { 'State/912130': [Object] }
  },
  'State/914351': {
    latex: '\\mathrm{O_{2}}',
    valid: false,
    children: { 'State/914356': [Object] }
  }
}

particle: State/909535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant