From 9cf0849d96b4fde320ea01c4dc40c1fcb6ff5aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Jab=C5=82o=C5=84ski?= Date: Thu, 26 Jan 2017 08:40:36 +0100 Subject: [PATCH] Fix for missing user_metadata information in profile --- app/view/main/MainModel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/view/main/MainModel.js b/app/view/main/MainModel.js index 8cfeb806..ca541bd1 100644 --- a/app/view/main/MainModel.js +++ b/app/view/main/MainModel.js @@ -8,6 +8,6 @@ Ext.define('Rambox.view.main.MainModel', { name: 'Rambox' ,username: localStorage.getItem('profile') ? JSON.parse(localStorage.getItem('profile')).name : '' ,avatar: localStorage.getItem('profile') ? JSON.parse(localStorage.getItem('profile')).picture : '' - ,last_sync: localStorage.getItem('profile') ? new Date(JSON.parse(localStorage.getItem('profile')).user_metadata.services_lastupdate).toUTCString() : '' + ,last_sync: localStorage.getItem('profile') && localStorage.getItem('profile').user_metadata ? new Date(JSON.parse(localStorage.getItem('profile')).user_metadata.services_lastupdate).toUTCString() : '' } });