From 0ff8d4e7a436e6a3b3597f4ad5dade3740b1735d Mon Sep 17 00:00:00 2001 From: ShvaykaD Date: Tue, 3 Nov 2020 19:46:30 +0200 Subject: [PATCH] fix more typos --- ...qtt-device-profile-transport-configuration.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts index f9f815a439..2b301420fa 100644 --- a/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts +++ b/ui-ngx/src/app/modules/home/components/profile/device/mqtt-device-profile-transport-configuration.component.ts @@ -87,12 +87,12 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control configuration: this.fb.group({ deviceAttributesTopic: [null, [Validators.required, this.validationMQTTTopic()]], deviceTelemetryTopic: [null, [Validators.required, this.validationMQTTTopic()]], - transportPayloadType: [MqttTransportPayloadType.JSON, Validators.required], + transportPayloadType: [MqttTransportPayloadType.JSON, Validators.required] }) }); let configurationFormGroup = this.mqttDeviceProfileTransportConfigurationFormGroup.controls.configuration as FormGroup; configurationFormGroup.get('transportPayloadType').valueChanges.subscribe(payloadType => { - this.updateTransportPayloadBasedControls(payloadType, configurationFormGroup) + this.updateTransportPayloadBasedControls(payloadType, configurationFormGroup); this.mqttDeviceProfileTransportConfigurationFormGroup.updateValueAndValidity(); }); this.mqttDeviceProfileTransportConfigurationFormGroup.valueChanges.subscribe(() => { @@ -117,8 +117,7 @@ export class MqttDeviceProfileTransportConfigurationComponent implements Control writeValue(value: MqttDeviceProfileTransportConfiguration | null): void { if (isDefinedAndNotNull(value)) { let configurationFormGroup = this.mqttDeviceProfileTransportConfigurationFormGroup.controls.configuration as FormGroup; - let type = value.transportPayloadType; - this.updateTransportPayloadBasedControls(type, configurationFormGroup); + this.updateTransportPayloadBasedControls(value.transportPayloadType, configurationFormGroup); this.mqttDeviceProfileTransportConfigurationFormGroup.patchValue({configuration: value}, {emitEvent: false}); } }