@companieshouse/ch-node-utils 2.1.7 → 2.1.9

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": "@companieshouse/ch-node-utils",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "author": "companieshouse",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -31,12 +31,12 @@
31
31
  {# Run JavaScript at end of the <body>, to avoid blocking the initial render. #}
32
32
  {# Starting in GOV.UK Frontend version 5, JavaScript is only loaded in modern browsers using ES6 Module imports. #}
33
33
  {% if govukFrontendVersion | first >= "5" %}
34
- <script type="module">
34
+ <script type="module"{% if nonce %} nonce="{{ nonce }}"{% endif %}>
35
35
  import { initAll } from '{{ cdnHost }}/javascripts/govuk-frontend/v{{ govukFrontendVersion }}/govuk-frontend-{{ govukFrontendVersion }}.min.js'
36
36
  initAll()
37
37
  </script>
38
38
  {% else %}
39
39
  <script src="{{ cdnHost }}/javascripts/govuk-frontend/v{{ govukFrontendVersion }}/govuk-frontend-{{ govukFrontendVersion }}.min.js"></script>
40
- <script>window.GOVUKFrontend.initAll()</script>
40
+ <script{% if nonce %} nonce="{{ nonce }}"{% endif %}>window.GOVUKFrontend.initAll()</script>
41
41
  {% endif %}
42
42
  {% endblock %}