fix: only spawn syncxhr worker when syncxhr is enabled

This commit is contained in:
Percs 2024-10-15 13:50:55 -05:00
parent cb3c433b69
commit 7233c60ac0

View file

@ -11,7 +11,7 @@ if (self.Worker) {
export default function (client: ScramjetClient, self: Self) {
let worker;
if (self.Worker) {
if (self.Worker && flagEnabled("syncxhr", client.url)) {
worker = new nativeworker(config.files.sync);
}
const ARGS = Symbol("xhr original args");