Skip to content

Commit b288039

Browse files
committed
fixup lint
1 parent b2fc65b commit b288039

File tree

1 file changed

+4
-2
lines changed
  • packages/json-api/src/-private/builders

1 file changed

+4
-2
lines changed

packages/json-api/src/-private/builders/-utils.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export interface JSONAPIConfig extends BuildURLConfig {
1717
}
1818

1919
const JsonApiAccept = 'application/vnd.api+json';
20-
export let CONFIG: JSONAPIConfig = { host: '', namespace: '' };
20+
const DEFAULT_CONFIG: JSONAPIConfig = { host: '', namespace: '' };
21+
export let CONFIG: JSONAPIConfig = DEFAULT_CONFIG;
2122
export let ACCEPT_HEADER_VALUE = 'application/vnd.api+json';
2223

2324
/**
@@ -62,7 +63,7 @@ export let ACCEPT_HEADER_VALUE = 'application/vnd.api+json';
6263
* @returns void
6364
*/
6465
export function setBuildURLConfig(config: JSONAPIConfig): void {
65-
Object.assign(CONFIG, config);
66+
CONFIG = Object.assign({}, DEFAULT_CONFIG, config);
6667

6768
if (config.profiles || config.extensions) {
6869
let accept = JsonApiAccept;
@@ -78,6 +79,7 @@ export function setBuildURLConfig(config: JSONAPIConfig): void {
7879
accept += ';ext=' + extensions.join(' ');
7980
}
8081
}
82+
ACCEPT_HEADER_VALUE = accept;
8183
}
8284

8385
setConfig(config);

0 commit comments

Comments
 (0)