add comments

This commit is contained in:
Beverly Nguyen
2024-08-12 11:51:20 -07:00
parent 96d6415578
commit a0e177b99b

View File

@@ -192,9 +192,9 @@
// Choose the correct JSON string based on the type ('service' or 'user'),
// replace single quotes with double quotes to ensure valid JSON format,
// then parse the JSON string into a JavaScript object.
var statJson = type === 'service' ? daily_stats : daily_stats_by_user;
statJson = statJson.replace(/'/g, '"');
data = JSON.parse(statJson);
var statsJson = type === 'service' ? daily_stats : daily_stats_by_user;
statsJson = statsJson.replace(/'/g, '"');
data = JSON.parse(statsJson);
} catch (error) {
console.error('Error parsing JSON data:', error);
return;