From 1c7530cff722789b7d61b5b886c8ced6e77ca726 Mon Sep 17 00:00:00 2001 From: abose Date: Thu, 23 Jul 2015 16:48:18 +0530 Subject: [PATCH] on a fresh install, always return empty data if no stored data. --- src/utils/HealthLogger.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/HealthLogger.js b/src/utils/HealthLogger.js index fcdcfc5e9ad..5828817be8e 100644 --- a/src/utils/HealthLogger.js +++ b/src/utils/HealthLogger.js @@ -60,7 +60,8 @@ define(function (require, exports, module) { * @return {Object} Health Data aggregated till now */ function getStoredHealthData() { - return PreferencesManager.getViewState(HEALTH_DATA_STATE_KEY); + var storedData = PreferencesManager.getViewState(HEALTH_DATA_STATE_KEY) || {}; + return storedData; } /**