From 737f64596dbc29e47a6b993b5cb28a9d5114a11a Mon Sep 17 00:00:00 2001 From: arafath Date: Fri, 10 Jan 2020 14:54:59 +0530 Subject: [PATCH] Issue: #SB-16926 fix: getDeviceProfileHandler dependency of deviceRegisterHandler to be initialised earlier --- src/device-register/impl/device-register-service-impl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/device-register/impl/device-register-service-impl.ts b/src/device-register/impl/device-register-service-impl.ts index 53903c516..edc453006 100644 --- a/src/device-register/impl/device-register-service-impl.ts +++ b/src/device-register/impl/device-register-service-impl.ts @@ -24,10 +24,10 @@ export class DeviceRegisterServiceImpl implements DeviceRegisterService { @inject(InjectionTokens.APP_INFO) private appInfoService: AppInfo, @inject(InjectionTokens.API_SERVICE) private apiService: ApiService, ) { + this.getDeviceProfileHandler = new GetDeviceProfileHandler(this.sdkConfig, this.deviceInfo, this.apiService); + this.deviceRegisterHandler = new DeviceRegisterHandler(this.sdkConfig, this.deviceInfo, this.sharedPreferences, this.frameworkService, this.appInfoService, this.apiService, this.getDeviceProfileHandler); - - this.getDeviceProfileHandler = new GetDeviceProfileHandler(this.sdkConfig, this.deviceInfo, this.apiService); } registerDevice(request?: DeviceRegisterRequest): Observable {