diff --git a/lib/platform/require.js b/lib/platform/require.js index 99aa5ab..a04363b 100644 --- a/lib/platform/require.js +++ b/lib/platform/require.js @@ -88,7 +88,11 @@ Module.patch = function (globalCtx, url, port) { // ignore } - globalCtx.localeStrings = Module.require('localeStrings'); + try { + globalCtx.localeStrings = Module.require('localeStrings'); + } catch (e) { + globalCtx.localeStrings = []; + } Module.connectServer(); }; @@ -120,8 +124,9 @@ Module.connectServer = function () { }); client.on('connect', function () { - if (retryInterval) { + if (retryInterval !== null) { clearInterval(retryInterval); + retryInterval = null; console.log('[LiveView]', 'Reconnected to Event Server'); } });