From a8aff87f1e0764517b591e6efe2432d1aae5c877 Mon Sep 17 00:00:00 2001 From: raxelsen Date: Thu, 5 Apr 2018 10:40:45 +0200 Subject: [PATCH] TT#35253 Conversations: Uncaught promise error bug Change-Id: I9126810f2738306955fde8ce1ef8d9241441539f --- src/store/conversations.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/store/conversations.js b/src/store/conversations.js index 6a5921b8..12e7a268 100644 --- a/src/store/conversations.js +++ b/src/store/conversations.js @@ -53,10 +53,15 @@ export default { }, actions: { loadConversations(context) { - getConversations(localStorage.getItem('subscriberId'), context.state.page, context.state.rows) - .then(result => { - context.commit('loadConversations', result); - }) + return new Promise((resolve, reject) => { + getConversations(localStorage.getItem('subscriberId'), context.state.page, context.state.rows) + .then((result) => { + context.commit('loadConversations', result); + resolve(); + }).catch((err)=>{ + reject(err); + }); + }); }, downloadVoiceMail(context, id) { context.commit('downloadVoiceMailRequesting');