Codacy JS fixes
This commit is contained in:
parent
8aa334d626
commit
ded4682c9b
|
@ -203,9 +203,9 @@ async function loadTable ({ tablePage, setInterval = true, interval = 10000, onl
|
|||
loadTable(tablePage, setInterval, interval); // retry
|
||||
} // else nothing
|
||||
} else {
|
||||
caches.open("tables-1").then(cache => {
|
||||
cache.match("/table_" + tablePage + ".json").then(response => {
|
||||
response.json().then(data => {
|
||||
caches.open("tables-1").then((cache) => {
|
||||
cache.match("/table_" + tablePage + ".json").then((response) => {
|
||||
response.json().then((data) => {
|
||||
fillTable({ data, replaceLatLngWithMap, callback });
|
||||
console.log("Table loaded from cache");
|
||||
$("#offline_update").text(new Date(parseInt(response.headers.get("date"), 10)).toLocaleString());
|
||||
|
|
|
@ -85,12 +85,12 @@ function loadMap (lat = undefined, lng = undefined, selectorId = undefined, sele
|
|||
window.addEventListener("focus", function (event) {
|
||||
if ($("#addr").val() === "") {
|
||||
console.log("Loading location from clipboard");
|
||||
navigator.clipboard.readText().then(text => {
|
||||
navigator.clipboard.readText().then((text) => {
|
||||
$("#addr").val(text);
|
||||
if (!addrSearch()) {
|
||||
$("#addr").val("");
|
||||
}
|
||||
}).catch(err => {
|
||||
}).catch((err) => {
|
||||
console.error("Failed to read clipboard contents: ", err);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ const removeSourceMapUrlAfterBuild = () => {
|
|||
fs.unlinkSync(key);
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var configFile = require("./config.json");
|
||||
const sentryEnabled = configFile.sentryEnabled &&
|
||||
|
|
Loading…
Reference in New Issue