var origtext = Aes.Ctr.decrypt(recentPatientsFile.read().text, 'L0ck it up saf3', 256);
var recentPatientsList = JSON.parse(origtext);
while doing an alert(origtext)
, i get empty data. The JSON.parse(empty data) works fine in other browsers, but in google chrome i get Uncaught SyntaxError: Unexpected end of input
. When i remove the JSON.parse(), then everything seems to be fine.
Just escape it like this
var value = JSON.parse(origtext || "null");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With