Skip to content

Commit

Permalink
Merge pull request #5695 from formio/FIO-8639-Adding-address-componen…
Browse files Browse the repository at this point in the history
…t-to-the-form-causes-an-error

FIO-8639 fixed error when adding address component
  • Loading branch information
brendanbond authored Jul 17, 2024
2 parents f2a9ce6 + 024ad9c commit 6402ec5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/address/Address.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/address/editForm/Address.edit.provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6402ec5

Please sign in to comment.