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

Conversation

@kevinpagtakhan
Copy link
Contributor

@kevinpagtakhan kevinpagtakhan commented Oct 25, 2022

Summary

Creates clone of nested objects in DEFAULT_OPTIONS to break sharing of references to these nested objects

Testing

const a = amplitude.getInstance('a')
> undefined
const a = amplitude.getInstance('a')
> undefined
a.options.plan === b.options.plan
> false
a.options.library === b.options.library
> false
a.options.headers === b.options.headers
> false
a.options.ingestionMetadata === b.options.ingestionMetadata
> false

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@kevinpagtakhan kevinpagtakhan requested review from a team and liuyang1520 October 25, 2022 18:05
@kevinpagtakhan kevinpagtakhan self-assigned this Oct 25, 2022
src/amplitude-client.js Show resolved Hide resolved
src/amplitude-client.js Show resolved Hide resolved
src/amplitude-client.js Show resolved Hide resolved
@kevinpagtakhan kevinpagtakhan merged commit 5129c45 into main Oct 25, 2022
@kevinpagtakhan kevinpagtakhan deleted the DXOC-240 branch October 25, 2022 18:28
github-actions bot pushed a commit that referenced this pull request Oct 25, 2022
## [8.21.2](v8.21.1...v8.21.2) (2022-10-25)

### Bug Fixes

* nested object in options are shared across multiple instances ([#559](#559)) ([5129c45](5129c45))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

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