@qhealth-design-system/core 1.1.0 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.2.0 - 2023-11-28
11
+
10
12
  ## 1.1.0 - 2023-11-27
11
13
 
12
14
  ## 1.0.113 - 2023-11-24
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qhealth-design-system/core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "",
5
5
  "licence": "MIT",
6
6
  "main": "index.js",
@@ -14,12 +14,15 @@
14
14
  function initGlobalAlert() {
15
15
 
16
16
  var alerts = document.getElementsByClassName("qld__global-alert") || [];
17
- var siteName = document.querySelector(".qld__global-alert__include")?.alertContainer?.getAttribute("data-name");
17
+ var siteName = null;
18
+ if( document.querySelector(".qld__global-alert__include") && document.querySelector(".qld__global-alert__include").alertContainer) {
19
+ siteName = document.querySelector(".qld__global-alert__include").alertContainer.getAttribute("data-name");
20
+ }
18
21
  var index = 0;
19
22
 
20
23
  for (const alert of alerts) {
21
24
 
22
- if (siteName?.length > 0) {
25
+ if (siteName) {
23
26
  var alertSeen = QLD.utils.getCookie(`${siteName}_alertSeen_${++index}`); //increment index so the next alert can be checked.
24
27
  if (alertSeen) { //if this specific alert is seen and closed, hide it.
25
28
  alert.style.maxHeight = "0";