@gouvfr/dsfr-roller 1.0.57 → 1.0.59

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gouvfr/dsfr-roller",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR",
5
5
  "keywords": [
6
6
  "Système de Design de l'État",
@@ -56,7 +56,7 @@
56
56
  ],
57
57
  "main": "./index.js",
58
58
  "dependencies": {
59
- "@gouvfr/dsfr-forge": "=1.0.57",
59
+ "@gouvfr/dsfr-forge": "=1.0.59",
60
60
  "@gouvfr/dsfr-publisher": "npm:@gouvfr/dsfr@1.14.2",
61
61
  "deepmerge": "^4.3.1",
62
62
  "ejs": "^3.1.10",
@@ -26,12 +26,10 @@ class Storybook extends Element {
26
26
  }
27
27
 
28
28
  setIframeTheme() {
29
- const theme = document.documentElement.getAttribute('data-fr-theme');
30
- if (theme) {
31
- const url = new URL(window.location.origin + this.iframe.dataset.src);
32
- url.searchParams.set('globals', `theme:${theme}`);
33
- this.iframe.src = url.toString();
34
- }
29
+ const theme = document.documentElement.getAttribute('data-fr-theme') ?? 'light';
30
+ const url = new URL(window.location.origin + this.iframe.dataset.src);
31
+ url.searchParams.set('globals', `theme:${theme}`);
32
+ this.iframe.src = url.toString();
35
33
  }
36
34
 
37
35
  listenChangeDisplay() {