Functions on fields-added get executed twice
robbevp opened this issue · comments
Robbe Van Petegem commented
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?