Skip to content

Commit 7d92c04

Browse files
Refactor stack function to include config in defaultConfig initialization
1 parent d12840e commit 7d92c04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/contentstack.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@ export function stack(config: StackConfig): StackClass {
3939
params: {} as any,
4040
live_preview: {} as any,
4141
port: config.port as number,
42+
...config
4243
};
4344

4445
defaultConfig.defaultHostname = config.host || Utility.getHost(config.region, config.host);
4546
config.host = defaultConfig.defaultHostname;
4647

48+
// if (typeof config.timeout !== 'undefined') {
49+
// defaultConfig.timeout = config.timeout;
50+
// }
4751
if (config.apiKey) {
4852
defaultConfig.headers.api_key = config.apiKey;
4953
} else {

0 commit comments

Comments
 (0)