Hello. There were problems with the transfer of the code http://salejs.com/ I am trying to transfer it from someone else's server to my own, I installed everything, it looks like it works, but it gives this error when sending the form from the site (I assume that when processing it, the message about successful sending out, but the letter does not come):
Uncaught SyntaxError: Unexpected token v in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onreadystatechange (cart.js:64) xhr.onreadystatechange @ cart.js:64 File cart.js Listed lines
xhr.onreadystatechange = function(){ if(responded) return if(xhr.readyState == 4){ responded = true if(xhr.status == 200) callback(null, JSON.parse(xhr.responseText)) else callback(new Error(xhr.responseText)) } } Consoles do not like this line
if(xhr.status == 200) callback(null, JSON.parse(xhr.responseText)) I tried to look for a solution to the problem on my own, but it did not work out. If it is not difficult, tell me the solution, or at least indicate the direction in which to look. Thank.