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

fix: allow pools to not be defined without raising exceptions #2005

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/frontend/javascript/legacy_scripts_a.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@
control.find('a[href="' + defaultTab + '"]').tab('show')

plateElement.on('click', '.aliquot', function (event) {
control.find('a[data-plate-view="pools-view"]').tab('show')

Check warning on line 63 in app/frontend/javascript/legacy_scripts_a.js

View check run for this annotation

Codecov / codecov/patch

app/frontend/javascript/legacy_scripts_a.js#L62-L63

Added lines #L62 - L63 were not covered by tests
let pool = $(event.currentTarget).data('pool')

control.find('a[data-plate-view="pools-view"]').tab('show')
// Handle cases where pool is not defined to prevent errors
if (pool === undefined || pool === '') return

Check warning on line 67 in app/frontend/javascript/legacy_scripts_a.js

View check run for this annotation

Codecov / codecov/patch

app/frontend/javascript/legacy_scripts_a.js#L66-L67

Added lines #L66 - L67 were not covered by tests

plateElement
.find('.aliquot[data-pool!=' + pool + ']')
Expand Down
Loading