A form helper like this one
<%= f.filestack_field :image_url, 'Upload Photo' %>
renders this html/js code
<button name="button" type="button" onclick="(function(){
filestack_client.picker({, onUploadDone: data => (function(data){const filestack_input_field= document.getElementById('nilclass_image_url');filestack_input_field.value = data.filesUploaded[0].url;})(data)}).open()
})()">
Upload Photo
</button>
<input id="nilclass_image_url" style="display:none" type="text" name="selfies[image_url]">
The issue is on the object received by the filestack_client.picker function that has a comma preceded by nothing and followed by the onUploadDone callback:
{ , onUploadDone: data => (function(data){...}) }