Skip to content

Commit 392019c

Browse files
Fix region endpoint initialization by ensuring the region parameter is converted to lowercase before retrieval
1 parent 66c860b commit 392019c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/contentstack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ export function client (params = {}) {
164164
let defaultHostName = getRegionEndpoint('na')
165165

166166
if (params.region) {
167-
defaultHostName = getRegionEndpoint(params.region.toLowerCase())
167+
params.region = params.region.toLowerCase()
168+
defaultHostName = getRegionEndpoint(params.region)
168169
}
169170

170171
const defaultParameter = {

0 commit comments

Comments
 (0)