Hugo form issues with javascript

I got a weird error blocking my ability in Hugo to submit a booking form ( even after I upgraded from 0.88 to 0.92 ) on Netlify.

The console error is

Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
and the culprit is this bit of baseof.html:

I am not keen to remove the IE references as unfortunately many customers may use it.
If I delete those I get another problem:

404 page not found
with this javascript error even though I have 404.html in

Uncaught (in promise) SyntaxError: Unexpected token p in JSON at position 4
Any ideas how best to deal with this? This appears more JS related than Hugo but it all comes with the engine.

Thanks
Alfred