it seems you are avoiding certain JS features on the front-end, like const or arrow functions, but you use the fetch api which is less supported than these other features.
https://caniuse.com/#search=const
https://caniuse.com/#search=fetch
I would either convert all your code to ES6 or look into a polyfill for fetch.
Let me know if you have any questions.