set debug flag at the start of worker code

This commit is contained in:
Stewart Allen 2022-02-04 15:46:55 -05:00
commit 79061fa127
3 changed files with 11 additions and 5 deletions

View file

@ -10,6 +10,7 @@ let KIRI = self.kiri = self.kiri || {},
host = loc.hostname,
port = loc.port,
proto = loc.protocol,
debug = self.debug === true,
time = function() { return new Date().getTime() },
seqid = 1,
syncd = {},
@ -57,7 +58,8 @@ KIRI.work = {
if (self.createWorker) {
return self.createWorker();
} else {
return new Worker(`/code/kiri_work.js?${gapp.version}`);
let _ = debug ? '_' : '';
return new Worker(`/code/kiri_work.js?${_}${gapp.version}`);
}
},