Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Merge pull request #213 from girder/add-guard
Browse files Browse the repository at this point in the history
Add guard to a match check.
  • Loading branch information
manthey authored May 2, 2023
2 parents dca4c63 + 203b8e1 commit f820eba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slicer_cli_web/web_client/views/PanelGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const PanelGroup = View.extend({
if (Array.isArray(value)) {
params[key] = JSON.stringify(value);
}
const ctlmatch = value.match(/^{#control:(.*)#}$/);
const ctlmatch = value ? ('' + value).match(/^{#control:(.*)#}$/) : undefined;
if (ctlmatch) {
params[key] = $(ctlmatch[1]).val() || $(ctlmatch[1]).text() || $(ctlmatch[1]).prop('checked');
}
Expand Down

0 comments on commit f820eba

Please sign in to comment.