@cntrl-site/sdk 1.1.3 → 1.1.5

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.
@@ -20,11 +20,11 @@ class Client {
20
20
  }
21
21
  static getPageMeta(projectMeta, pageMeta) {
22
22
  return pageMeta.enabled ? {
23
- title: pageMeta.title ? pageMeta.title : projectMeta.title,
24
- description: pageMeta.description ? pageMeta.description : projectMeta.description,
25
- keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords,
26
- opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail,
27
- favicon: projectMeta.favicon
23
+ title: pageMeta.title ? pageMeta.title : projectMeta.title ?? '',
24
+ description: pageMeta.description ? pageMeta.description : projectMeta.description ?? '',
25
+ keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords ?? '',
26
+ opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail ?? '',
27
+ favicon: projectMeta.favicon ?? ''
28
28
  } : projectMeta;
29
29
  }
30
30
  async getPageData(pageSlug) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -27,7 +27,7 @@
27
27
  "lib": "lib"
28
28
  },
29
29
  "dependencies": {
30
- "@cntrl-site/core": "^1.22.4",
30
+ "@cntrl-site/core": "^1.24.0",
31
31
  "@types/ejs": "^3.1.2",
32
32
  "@types/isomorphic-fetch": "^0.0.36",
33
33
  "commander": "^10.0.1",
@@ -32,11 +32,11 @@ export class Client {
32
32
 
33
33
  private static getPageMeta(projectMeta: TMeta, pageMeta: TPageMeta): TMeta {
34
34
  return pageMeta.enabled ? {
35
- title: pageMeta.title ? pageMeta.title : projectMeta.title,
36
- description: pageMeta.description ? pageMeta.description : projectMeta.description,
37
- keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords,
38
- opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail,
39
- favicon: projectMeta.favicon
35
+ title: pageMeta.title ? pageMeta.title : projectMeta.title ?? '',
36
+ description: pageMeta.description ? pageMeta.description : projectMeta.description ?? '',
37
+ keywords: pageMeta.keywords ? pageMeta.keywords : projectMeta.keywords ?? '',
38
+ opengraphThumbnail: pageMeta.opengraphThumbnail ? pageMeta.opengraphThumbnail : projectMeta.opengraphThumbnail ?? '',
39
+ favicon: projectMeta.favicon ?? ''
40
40
  } : projectMeta;
41
41
  }
42
42