Why is the 'chosen_currency' field in my JS file not being filled out?

New Member
4 0 0

I'm getting this console js error:

Uncaught SyntaxError: Unexpected token ',' (at product1?variant=46948594495045:595:20)

It's from a JS file where a field for the chosen_currency isn't filled out with a string:

window.baCurr = window.baCurr || {};
window.baCurr.config = {}; window.baCurr.rePeat = function () {};
Object.assign(window.baCurr.config, {
"chosen_cur":,                    <<-------- HERE

That field should be filled out with something like this "":{"USD":"US Dollar (USD)"}" But it's not for some reason.

I uninstalled Currency HOP plugin which auto-changed the currency to the local one, but that didn't solve the error.

What could be causing it?

Thank you.

Reply 1 (1)

Shopify Partner
1 0 0

I know this is old but I just solved this problem.





Completely got rid of the syntax error! I'm using the impact theme so I'm not sure if it's theme specific OR if someone at shopify made a small error in their code while they were writing it.


Let me know if it works!