@gudhub/ssg-web-components-library 1.0.112 → 1.0.113

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.112",
3
+ "version": "1.0.113",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -277,16 +277,18 @@ class MetaTag extends GHComponent {
277
277
 
278
278
  } else {
279
279
  const meta = document.createElement('meta');
280
- let name;
281
- if (this.type == "title") {
282
- name = "title"
283
- } else if (this.type == "meta_image_src") {
284
- name = "image"
285
- } else {
286
- name = this.type
280
+
281
+ if (this.type === 'title') {
282
+ meta.setAttribute('name', 'title');
283
+ meta.setAttribute('content', titleValue);
284
+ } else if (this.type === 'description') {
285
+ meta.setAttribute('name', 'description');
286
+ meta.setAttribute('content', descriptionValue);
287
+ } else if (this.type === 'meta_image_src') {
288
+ meta.setAttribute('name', 'image');
289
+ meta.setAttribute('content', imageUrl);
287
290
  }
288
- meta.setAttribute('name', name);
289
- meta.setAttribute('content', value);
291
+
290
292
  document.querySelector('head').prepend(meta);
291
293
  }
292
294