diff --git a/libs/browser/src/lib/services/browser-micro-sentry-client.ts b/libs/browser/src/lib/services/browser-micro-sentry-client.ts index abd08e9..ebb34f1 100644 --- a/libs/browser/src/lib/services/browser-micro-sentry-client.ts +++ b/libs/browser/src/lib/services/browser-micro-sentry-client.ts @@ -11,6 +11,7 @@ import { State } from '../models/state'; import { MicroSentryPlugin } from '../models/plugin'; import { BrowserSentryClientOptions } from '../models/browser-sentry-client-options'; import { isMatchingPattern } from '../utils/is-matching-pattern'; +import { __assign } from 'tslib'; export class BrowserMicroSentryClient extends MicroSentryClient { private destroyed = false; @@ -233,8 +234,7 @@ export class BrowserMicroSentryClient extends MicroSentryClient { ? newStateValue : null; - return { - ...acc, + return __assign(acc, { [key]: stateArray || newStateArray ? [...(stateArray || []), ...(newStateArray || [])] @@ -242,7 +242,7 @@ export class BrowserMicroSentryClient extends MicroSentryClient { ...(typeof stateValue !== 'string' ? stateValue : {}), ...(typeof newStateValue !== 'string' ? newStateValue : {}), }, - }; + }); }, {} ); diff --git a/libs/core/src/lib/service/micro-sentry-client.ts b/libs/core/src/lib/service/micro-sentry-client.ts index e29b865..a793d09 100644 --- a/libs/core/src/lib/service/micro-sentry-client.ts +++ b/libs/core/src/lib/service/micro-sentry-client.ts @@ -2,25 +2,7 @@ import { SentryRequest } from '../models/models'; import { AUTH_HEADER, DSN_REGEXP } from '../consts/consts'; import { computeStackTrace } from '../helpers/compute-stack-trace'; import { SentryClientOptions } from '../models/sentry-client-options'; - -const __assign = - Object.assign || - function __assign(target: Record) { - const length = arguments.length; - - for (let i = 1; i < length; i++) { - // eslint-disable-next-line prefer-rest-params - const source = arguments[i]; - - for (const property in source) { - if (Object.prototype.hasOwnProperty.call(source, property)) { - target[property] = source[property]; - } - } - } - - return target; - }; +import { __assign } from 'tslib'; export class MicroSentryClient { readonly authHeader?: string;