diff --git a/CHANGELOG.md b/CHANGELOG.md index f59b268..0528d60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fix `saveB2BSettings` mutation when `uiSettings` is absent ## [0.63.1] - 2024-12-10 - ### Added - Added mail notification to `createOrganizationAndCostCenterWithAdminUser` mutation diff --git a/node/resolvers/Mutations/Settings.ts b/node/resolvers/Mutations/Settings.ts index b8d1a98..09a894f 100644 --- a/node/resolvers/Mutations/Settings.ts +++ b/node/resolvers/Mutations/Settings.ts @@ -104,9 +104,11 @@ const Settings = { transactionEmailSettings ?? currentB2BSettings?.transactionEmailSettings, uiSettings: { - showModal: uiSettings.showModal, - clearCart: uiSettings.clearCart, - topBar: uiSettings.topBar ?? currentB2BSettings?.uiSettings?.topBar, + showModal: + uiSettings?.showModal ?? currentB2BSettings?.uiSettings.showModal, + clearCart: + uiSettings?.clearCart ?? currentB2BSettings?.uiSettings.clearCart, + topBar: uiSettings?.topBar ?? currentB2BSettings?.uiSettings?.topBar, }, }