Skip to content

Commit

Permalink
Fix radioFieldset conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
britneywwc committed Nov 28, 2024
1 parent c057250 commit 288260f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion static/js/src/dynamic-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ import { prepareInputFields } from "./prepare-form-inputs.js";
const radioFieldsets = document.querySelectorAll(
".js-remove-radio-names",
);
if (radioFieldsets) {
if (radioFieldsets.length > 0) {
radioFieldsets.forEach((radioFieldset) => {
const radioInputs = radioFieldset.querySelectorAll(
"input[type='radio']",
Expand Down
2 changes: 1 addition & 1 deletion static/js/src/static-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function setUpStaticForms(form, formId) {
const radioFieldsets = document.querySelectorAll(
".js-remove-radio-names",
);
if (radioFieldsets) {
if (radioFieldsets.length > 0) {
radioFieldsets.forEach((radioFieldset) => {
const radioInputs = radioFieldset.querySelectorAll(
"input[type='radio']",
Expand Down

0 comments on commit 288260f

Please sign in to comment.