From 024ad9c3cebc0a23bf48dbcfe5b9877453099b2d Mon Sep 17 00:00:00 2001 From: Hanna Kurban Date: Wed, 17 Jul 2024 14:07:53 +0300 Subject: [PATCH] FIO-8639 fixed error when adding address component --- src/components/address/Address.js | 6 ++++++ src/components/address/editForm/Address.edit.provider.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/address/Address.js b/src/components/address/Address.js index 9ea06812a4..3ef7125dbb 100644 --- a/src/components/address/Address.js +++ b/src/components/address/Address.js @@ -123,6 +123,12 @@ export default class AddressComponent extends ContainerComponent { provider, providerOptions, } = this.component; + + if (_.get(providerOptions, 'params.subscriptionKey')) { + _.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey')); + _.unset(providerOptions, 'params.subscriptionKey'); + } + this.provider = this.initializeProvider(provider, providerOptions); } else if (this.component.map) { diff --git a/src/components/address/editForm/Address.edit.provider.js b/src/components/address/editForm/Address.edit.provider.js index 2e8f2842b0..bbd393357c 100644 --- a/src/components/address/editForm/Address.edit.provider.js +++ b/src/components/address/editForm/Address.edit.provider.js @@ -28,7 +28,7 @@ export default [ { type: 'textfield', input: true, - key: "providerOptions.params['subscription-key']", + key: "providerOptions.params.subscriptionKey", label: 'Subscription Key', placeholder: 'Enter Subscription Key', weight: 10,