@sitecore-jss/sitecore-jss-nextjs 21.7.0-canary.17 → 21.7.0-canary.18

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.
@@ -26,7 +26,7 @@ class Context {
26
26
  * @returns initialized SDK
27
27
  */
28
28
  this.getSDK = (name) => {
29
- return this.sdkPromises[name];
29
+ return this.sdkPromises[name] || Promise.reject(`Unknown SDK '${String(name)}'`);
30
30
  };
31
31
  this.sitecoreEdgeUrl = props.sitecoreEdgeUrl;
32
32
  this.sitecoreEdgeContextId = props.sitecoreEdgeContextId;
@@ -23,7 +23,7 @@ export class Context {
23
23
  * @returns initialized SDK
24
24
  */
25
25
  this.getSDK = (name) => {
26
- return this.sdkPromises[name];
26
+ return this.sdkPromises[name] || Promise.reject(`Unknown SDK '${String(name)}'`);
27
27
  };
28
28
  this.sitecoreEdgeUrl = props.sitecoreEdgeUrl;
29
29
  this.sitecoreEdgeContextId = props.sitecoreEdgeContextId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "21.7.0-canary.17",
3
+ "version": "21.7.0-canary.18",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -73,9 +73,9 @@
73
73
  "react-dom": "^18.2.0"
74
74
  },
75
75
  "dependencies": {
76
- "@sitecore-jss/sitecore-jss": "^21.7.0-canary.17",
77
- "@sitecore-jss/sitecore-jss-dev-tools": "^21.7.0-canary.17",
78
- "@sitecore-jss/sitecore-jss-react": "^21.7.0-canary.17",
76
+ "@sitecore-jss/sitecore-jss": "^21.7.0-canary.18",
77
+ "@sitecore-jss/sitecore-jss-dev-tools": "^21.7.0-canary.18",
78
+ "@sitecore-jss/sitecore-jss-react": "^21.7.0-canary.18",
79
79
  "@vercel/kv": "^0.2.1",
80
80
  "node-html-parser": "^6.1.4",
81
81
  "prop-types": "^15.8.1",
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "description": "",
86
86
  "types": "types/index.d.ts",
87
- "gitHead": "5ddad312682a0a08aacc86dbc8416690b69b7301",
87
+ "gitHead": "401f9b4c3e4884660c82571ccaa7a767b1eef8ad",
88
88
  "files": [
89
89
  "dist",
90
90
  "types",
@@ -92,7 +92,7 @@ export declare class Context<SDKModules extends SDKModulesType> {
92
92
  * @param {string} name SDK name
93
93
  * @returns initialized SDK
94
94
  */
95
- getSDK: <T extends keyof SDKModules>(name: T) => Promise<SDKModules[T]["sdk"]> | undefined;
95
+ getSDK: <T extends keyof SDKModules>(name: T) => Promise<SDKModules[T]["sdk"]>;
96
96
  /**
97
97
  * Initializes the Software Development Kit (SDK)
98
98
  *