Skip to content

Commit 677181b

Browse files
committed
Update client-channel.js
1 parent fff47aa commit 677181b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

worker/client-channel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
// update worker name when updating worker
7-
const WORKER_NAME = 'codeit-worker-v524';
7+
const WORKER_NAME = 'codeit-worker-v525';
88

99

1010
// internal paths
@@ -166,6 +166,7 @@ let enableDevLogs = false;
166166

167167
workerChannel.addEventListener('message', (event) => {
168168

169+
if (event.data.type === 'updateWorker') self.registration.update();
169170
if (event.data.type === 'enableDevLogs') enableDevLogs = true;
170171
if (event.data.type === 'hello') workerChannel.postMessage('hello!');
171172

0 commit comments

Comments
 (0)