Skip to content

Commit bef5265

Browse files
authored
Merge pull request #13 from contentstack/next
DX | 727 | region issue fix
2 parents 424a0d5 + 292089f commit bef5265

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Change log
22

3+
### Version: 4.0.3
4+
#### Date: June-11-2024
5+
Fixed region issue
6+
37
### Version: 4.0.2
48
#### Date: June-03-2024
59
Custom host implementation

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/delivery-sdk",
3-
"version": "4.0.2",
3+
"version": "4.0.3",
44
"type": "commonjs",
55
"main": "./dist/cjs/src/index.js",
66
"types": "./dist/types/src/index.d.ts",

src/lib/contentstack.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ export function stack(config: StackConfig): StackClass {
4949
config.live_preview.host = config.host
5050
}
5151
} else {
52+
defaultConfig.defaultHostname = config.host ? config.host : getHost(config.region, config.host);
5253
config.host = config.host || defaultConfig.defaultHostname;
5354
defaultConfig.live_preview = config.live_preview
5455
}
5556

56-
defaultConfig.defaultHostname = config.host ? config.host : getHost(config.region, config.host);
57-
5857
if (config.apiKey) {
5958
defaultConfig.headers.api_key = config.apiKey;
6059
} else {

0 commit comments

Comments
 (0)