@gudhub/ssg-web-components-library 1.0.41 → 1.0.42

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": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -53,7 +53,7 @@
53
53
  ${addressIcon}
54
54
  </div>
55
55
  <div class="flex-wrapper">
56
- <h3>Adress:</h3>
56
+ <h3>Address:</h3>
57
57
  <span>${info.fullAddress}</span>
58
58
  </div>
59
59
  </a>
@@ -126,12 +126,7 @@ class EditMode extends GHComponent {
126
126
  }
127
127
  let ids = await self.findIds();
128
128
 
129
- let currentChapter;
130
- if (document.querySelector('html').hasAttribute('data-current-chapter')) {
131
- currentChapter = document.querySelector('html').getAttribute('data-current-chapter');
132
- } else {
133
- currentChapter = 'pages';
134
- }
129
+ const currentChapter = window?.constants?.currentChapter || 'pages';
135
130
 
136
131
  const data = await gudhub.getDocument({app_id: ids.appId, item_id: ids.itemId, element_id: document.querySelector('html').getAttribute(`data-${currentChapter}-json_field_id`)});
137
132
  const json = JSON.parse(data.data);