nsw-design-system 3.16.0 → 3.16.1

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/dist/js/main.js CHANGED
@@ -4698,8 +4698,9 @@
4698
4698
  }
4699
4699
  });
4700
4700
  this.share.addEventListener('click', event => {
4701
- event.preventDefault();
4702
4701
  const button = event.target.closest('a');
4702
+ if (!button) return;
4703
+ event.preventDefault();
4703
4704
  const social = button.getAttribute('data-social');
4704
4705
  const url = this.getSocialUrl(button, social);
4705
4706
  if (social === 'mail') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsw-design-system",
3
- "version": "3.16.0",
3
+ "version": "3.16.1",
4
4
  "description": "Design system for Digital NSW",
5
5
  "main": "dist/main.js",
6
6
  "style": "dist/main.css",
@@ -23,8 +23,11 @@ class UtilityList extends Toggletip {
23
23
  })
24
24
 
25
25
  this.share.addEventListener('click', (event) => {
26
- event.preventDefault()
27
26
  const button = event.target.closest('a')
27
+ if (!button) return
28
+
29
+ event.preventDefault()
30
+
28
31
  const social = button.getAttribute('data-social')
29
32
  const url = this.getSocialUrl(button, social)
30
33
  if (social === 'mail') {