Skip to content

Commit 224e79c

Browse files
committed
web: Fix script directory that's passed to locateFile
1 parent 775ec76 commit 224e79c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/binding_web/prefix.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
var TreeSitter = function() {
22
var initPromise;
3+
var document = typeof window == 'object'
4+
? {currentScript: window.document.currentScript}
5+
: null;
6+
37
class Parser {
48
constructor() {
59
this.initialize();
@@ -11,5 +15,5 @@ var TreeSitter = function() {
1115

1216
static init(moduleOptions) {
1317
if (initPromise) return initPromise;
14-
Module = Object.assign({ }, Module, moduleOptions);
18+
Module = Object.assign({}, Module, moduleOptions);
1519
return initPromise = new Promise((resolveInitPromise) => {

0 commit comments

Comments
 (0)