It makes the reason of the data structure clearer :-)
addCoffee(flavor);
}
break;
- case "fuck":
+ case "ajax_failure":
ajax(msg.method, msg.route, msg.data, msg.id);
break;
}
updateUI();
if (localStorage) {
- var fuck = JSON.stringify({
- type: "fuck",
+ var ajax_failure = JSON.stringify({
+ type: "ajax_failure",
method: method,
route: route,
data: data,
id: id
});
let queue = JSON.parse(localStorage.getItem("offlineQueue")) || [];
- queue.push({ time: Date.now(), data: fuck });
+ queue.push({ time: Date.now(), data: ajax_failure });
try {
localStorage.setItem("offlineQueue", JSON.stringify(queue));
}