Skip to content

Commit

Permalink
dependent_fields_frame: make it work without field.form
Browse files Browse the repository at this point in the history
  • Loading branch information
pascallaliberte committed Nov 16, 2024
1 parent 37f94df commit e0123ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class extends Controller {
constructNewUrlUpdatingField(field) {
const url = new URL(this.currentUrl)
const form = field.form
const formData = new FormData(form)
const formData = form ? new FormData(form) : {}

if (field.type === "checkbox" && field.name.endsWith("[]")) {
// Remove any existing values for this field
Expand Down

0 comments on commit e0123ad

Please sign in to comment.