We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 515e39c commit b880882Copy full SHA for b880882
src/worker.js
@@ -1,20 +1,16 @@
1
-/* global SQL initSqlJs */
+/* global initSqlJs */
2
/* eslint-env worker */
3
/* eslint no-restricted-globals: ["error"] */
4
var db;
5
6
-function createDb(data) {
+function onModuleReady(SQL) {
7
"use strict";
8
9
- if (db != null) {
10
- db.close();
+ function createDb(data) {
+ if (db != null) db.close();
11
+ db = new SQL.Database(data);
12
+ return db;
13
}
- db = new SQL.Database(data);
- return db;
14
-}
15
-
16
-function onModuleReady() {
17
- "use strict";
18
19
var buff; var data; var result;
20
data = this["data"];
0 commit comments