single-file-core 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -489,7 +489,11 @@ function getProcessorHelperClass(utilInstance) {
489
489
  acceptHeaders: options.acceptHeaders,
490
490
  networkTimeout: options.networkTimeout
491
491
  });
492
- scriptElement.textContent += `CSS.paintWorklet.addModule("${content}", ${JSON.stringify(workletOptions)});\n`;
492
+ if (workletOptions) {
493
+ scriptElement.textContent += ` CSS.paintWorklet.addModule("${content}", ${JSON.stringify(workletOptions)});\n`;
494
+ } else {
495
+ scriptElement.textContent += ` CSS.paintWorklet.addModule("${content}");\n`;
496
+ }
493
497
  }
494
498
 
495
499
  setMetaCSP(metaElement) {
@@ -409,7 +409,11 @@ function getProcessorHelperClass(utilInstance) {
409
409
  networkTimeout: options.networkTimeout
410
410
  });
411
411
  const name = "scripts/" + indexResource + extension;
412
- scriptElement.textContent += `CSS.paintWorklet.addModule("${name}", ${JSON.stringify(workletOptions)});\n`;
412
+ if (workletOptions) {
413
+ scriptElement.textContent += ` CSS.paintWorklet.addModule("${content}", ${JSON.stringify(workletOptions)});\n`;
414
+ } else {
415
+ scriptElement.textContent += ` CSS.paintWorklet.addModule("${content}");\n`;
416
+ }
413
417
  resources.worklets.set(indexResource, { name, workletOptions, content, extension, contentType, url: resourceURL });
414
418
  }
415
419
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",