Skip to content

Commit 4b33cb2

Browse files
Change worker.coffee to null out db on close
1 parent b221594 commit 4b33cb2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coffee/worker.coffee

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ if typeof importScripts is 'function' # Detect webworker context
4242
catch err # Some browsers fail when trying to use transferable objects
4343
postMessage result
4444
when 'close'
45-
db?.close()
45+
if db?
46+
db.close()
47+
db = null;
48+
return undefined
4649
else
4750
throw new 'Invalid action : ' + data?['action']

0 commit comments

Comments
 (0)