Skip to content

Commit 1782e06

Browse files
committed
Update sw.js
Remove unneeded console.log statements.
1 parent a63851f commit 1782e06

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

sw.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,17 @@ async function checkForChanges() {
6868
let url = "https://api.github.com/repos/ecc521/beginner-javascript-tutorial/commits/master"
6969

7070
let oldResponse = await caches.match(url)
71-
console.log(oldResponse)
7271
let oldHash;
7372
if (oldResponse) {
7473
oldHash = (await oldResponse.json()).sha
75-
console.log(oldHash)
7674
}
7775

7876
let latestCommit = await fetch(url)
7977
await cache.put(url, latestCommit.clone())
8078
let hash = (await latestCommit.json()).sha
8179

82-
console.log(hash)
83-
console.log(oldHash)
84-
8580
if (hash !== oldHash) {
81+
console.log("Tutorial has changed since data was cached. Updating data in cache.")
8682
preload()
8783
}
8884
}

0 commit comments

Comments
 (0)