mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-21 22:54:53 +08:00
Partly replace _ => with () => globally to conform with Googles JavaScript style guide if no parameters are expected in arrow functions
This commit is contained in:
@@ -56,7 +56,7 @@ const fromNetwork = (request, timeout) =>
|
||||
fetch(request).then(response => {
|
||||
clearTimeout(timeoutId);
|
||||
fulfill(response);
|
||||
update(request).then(() => console.log("Cache successfully updated for", request.url));
|
||||
update(request).then(_ => console.log("Cache successfully updated for", request.url));
|
||||
}, reject);
|
||||
});
|
||||
|
||||
@@ -77,7 +77,7 @@ const update = request =>
|
||||
.then(async response => {
|
||||
await cache.put(request, response);
|
||||
})
|
||||
.catch(() => console.log(`Cache could not be updated. ${request.url}`))
|
||||
.catch(_ => console.log(`Cache could not be updated. ${request.url}`))
|
||||
);
|
||||
|
||||
// general strategy when making a request (eg if online try to fetch it
|
||||
|
||||
Reference in New Issue
Block a user