diff --git a/src/js/yunohost/helpers.js b/src/js/yunohost/helpers.js index d572807a..30fae9e2 100644 --- a/src/js/yunohost/helpers.js +++ b/src/js/yunohost/helpers.js @@ -102,9 +102,9 @@ var args = data; // TODO: change this code if (uri === '/postinstall') { - var installing = false; + var post_installing = false; setInterval(function () { - installing = true; + post_installing = true; }, 1500); } @@ -112,8 +112,7 @@ callbackOnFailure = function(xhr) { // Postinstall is a custom case, we have to wait that // operation is done before doing anything - if (uri === '/postinstall') { - if (installing) { + if ((uri === '/postinstall') && (post_installing)) { interval = window.location.hostname === args.domain ? 20000 : 5000; checkInstall = setInterval(function () { c.checkInstall(function(isInstalled) { @@ -124,9 +123,6 @@ } }); }, interval); - } else { - c.flash('fail', y18n.t('error_occured')); - } } // Regular errors else { diff --git a/src/locales/en.json b/src/locales/en.json index 9e02d602..cd0d4c4b 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -141,7 +141,6 @@ "enable": "Enable", "enabled": "Enabled", "error_modify_something": "You should modify something", - "error_occured": "An error occurred, try again", "error_retrieve_feed": "Could not retrieve feed: %s. You might have a plugin prevent your browser from performing this request (or the website is down).", "error_select_domain": "You should indicate a domain", "error_server": "Server error",