Skip to content

Functions on fields-added get executed twice #109

@robbevp

Description

@robbevp

I can't seem to figure out why, but function that wait on fields-added seem to be executed twice

So

$(document).on("fields_added.nested_form_fields", function(){
  console.log("hi")
});

gives two times hi in the console

# file.js
var i = 0
$(document).on("fields_added.nested_form_fields", function(){
  i += 1
  console.log(i)
});

results in

# console
1 file.js:44:11
2 file.js:44:11

Any suggestions on what could cause this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions