Skip to content

Commit

Permalink
fix(core): Fix channel creation with defaultCurrencyCode field
Browse files Browse the repository at this point in the history
Fixes #2217
  • Loading branch information
michaelbromley committed Jun 12, 2023
1 parent 1c8fa62 commit 3aa72ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/service/services/channel.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ export class ChannelService {
}
const channel = new Channel({
...input,
defaultCurrencyCode: input.currencyCode,
defaultCurrencyCode,
availableCurrencyCodes:
input.availableCurrencyCodes ?? (input.currencyCode ? [input.currencyCode] : []),
input.availableCurrencyCodes ?? (defaultCurrencyCode ? [defaultCurrencyCode] : []),
availableLanguageCodes: input.availableLanguageCodes ?? [input.defaultLanguageCode],
});
const defaultLanguageValidationResult = await this.validateDefaultLanguageCode(ctx, input);
Expand Down

0 comments on commit 3aa72ab

Please sign in to comment.