From ff371207d50506e5b16cad2917a5a4778cbe47ac Mon Sep 17 00:00:00 2001 From: Aleksey Popov Date: Thu, 2 Nov 2017 11:07:47 +0300 Subject: [PATCH] fix exception throwing --- app/src/main.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main.js b/app/src/main.js index 10613c30f..dc3b03165 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -39,9 +39,10 @@ const sendDetectedLang = (locale) => { // read config data from JSON file const getConfig = () => { storage.get('config', (error, data) => { - if (error) throw error; - lang = data.lang; - sendDetectedLang(lang); + if (!error) { + lang = data.lang; + sendDetectedLang(lang); + } }); };