Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5129c45

Browse filesBrowse files
fix: nested object in options are shared across multiple instances (#559)
1 parent 064b8d4 commit 5129c45
Copy full SHA for 5129c45

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Open diff view settings
Collapse file

‎src/amplitude-client.js‎

Copy file name to clipboardExpand all lines: src/amplitude-client.js
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ var AmplitudeClient = function AmplitudeClient(instanceName) {
3939
this._instanceName = utils.isEmptyString(instanceName) ? Constants.DEFAULT_INSTANCE : instanceName.toLowerCase();
4040
this._unsentEvents = [];
4141
this._unsentIdentifys = [];
42-
this.options = { ...DEFAULT_OPTIONS, trackingOptions: { ...DEFAULT_OPTIONS.trackingOptions } };
42+
this.options = {
43+
...DEFAULT_OPTIONS,
44+
headers: { ...DEFAULT_OPTIONS.headers },
45+
ingestionMetadata: { ...DEFAULT_OPTIONS.ingestionMetadata },
46+
library: { ...DEFAULT_OPTIONS.library },
47+
plan: { ...DEFAULT_OPTIONS.plan },
48+
trackingOptions: { ...DEFAULT_OPTIONS.trackingOptions },
49+
};
4350
this.cookieStorage = new cookieStorage().getStorage();
4451
this._q = []; // queue for proxied functions before script load
4552
this._sending = false;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.