From f2af4bd078396ae6289312e66e152d058abc6c97 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Sat, 24 Sep 2016 01:35:59 +0530 Subject: [PATCH] Fixing undefined exception when device properties not available --- .../devicemgt/app/units/cdmf.unit.device.view/view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js index a3a0037dcb..be80c2e4a6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.view/view.js @@ -27,7 +27,7 @@ function onRequest(context) { if (device) { var viewModel = {}; - var deviceInfo = device.properties.DEVICE_INFO; + var deviceInfo = (device.properties) ? device.properties.DEVICE_INFO : null; if (deviceInfo != undefined && String(deviceInfo.toString()).length > 0) { deviceInfo = parse(stringify(deviceInfo)); if (device.type == "ios") {