Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/sdk-auth/src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type {
UserAuthOptions,
} from 'types/sdk'
import { decode, encode } from 'qss'
import defaultsDeep from 'lodash.defaultsdeep'
import { getErrorByCode } from '@commercetools/sdk-middleware-http'
import * as constants from './constants'

Expand Down Expand Up @@ -237,9 +236,9 @@ export default class SdkAuth {
}

_getRequestConfig(config: CustomAuthOptions = {}): AuthOptions {
const mergedConfig = defaultsDeep({}, config, this.config)
const mergedConfig = Object.assign({}, config, this.config)

// handle scopes array - defaultsDeep would merge arrays together
// handle scopes array - Object.assign would merge arrays together
// instead of taking its first occurrence
if (config.scopes) mergedConfig.scopes = config.scopes

Expand Down