Skip to content

Guard against undefined PanelApp evidence entries (#1597)#1608

Merged
davmlaw merged 2 commits into
masterfrom
issue_1597_panelapp_confidence_level_guard
Jun 22, 2026
Merged

Guard against undefined PanelApp evidence entries (#1597)#1608
davmlaw merged 2 commits into
masterfrom
issue_1597_panelapp_confidence_level_guard

Conversation

@davmlaw

@davmlaw davmlaw commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What

Skip falsy/undefined entries when iterating the PanelApp gene-evidence results list in panel_app.js.

Why

The gene grid PanelApp integration reads confidence_level on each evidence entry (in addGeneEvidence and getConfidenceCSS). When an entry in the results list was undefined, this threw:

TypeError: Cannot read properties of undefined (reading 'confidence_level')

The single-line if (!evidence) continue; guard in the results loop covers both call sites that dereference the entry, so a missing entry is silently skipped instead of crashing the hover-card render.

Addresses #1597

Risk

Minimal — only adds a skip for already-broken (undefined) entries; happy-path behaviour is unchanged.

🤖 Generated with Claude Code

davmlaw added 2 commits June 11, 2026 12:13
The gene grid PanelApp integration iterated over the evidence results
list and read confidence_level (via addGeneEvidence and getConfidenceCSS)
on each entry. When an entry was undefined, this threw
"TypeError: Cannot read properties of undefined (reading 'confidence_level')".

Skip falsy entries in the results loop so missing entries are ignored
instead of crashing the hover-card rendering.
@davmlaw davmlaw merged commit ce2893f into master Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant