Skip to content

Commit 99a0318

Browse files
committed
Update
1 parent b75d0b5 commit 99a0318

File tree

3 files changed

+385
-296
lines changed

3 files changed

+385
-296
lines changed

src/public/register-service-worker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const swAvailable = 'serviceWorker' in navigator
22
const url = window.location.origin
3-
const swUrl = `${url}/service-worker.js`
3+
const swUrl = url + '/service-worker.js'
44

55
const throttle = (func, timeFrame) => {
66
let lastTime = 0
7-
return () => {
7+
return function () {
88
const now = new Date()
99
if (now - lastTime >= timeFrame) {
1010
func()
@@ -16,7 +16,7 @@ const throttle = (func, timeFrame) => {
1616
const register = () => {
1717
if (!swAvailable || origin.includes('http://localhost')) return
1818

19-
console.log(`Registering the service worker at ${swUrl}`)
19+
console.log('Registering the service worker at ' + swUrl)
2020

2121
navigator.serviceWorker
2222
.register(swUrl)

src/public/wasm/koder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ class Koder {
3636
this.api.deleteBuffer(resultAddress)
3737
}
3838
if (results.length > 0) return results[0]
39-
return null
39+
else return null
4040
}
4141
}

0 commit comments

Comments
 (0)