From d01ad09800b67d2c83e2707188c8e5c58991db1e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Jun 2020 07:44:57 +0300 Subject: eslint-related fixes; move a few things from global context to App --- js/CommonDialogs.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'js/CommonDialogs.js') diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js index ea178ffca..d3ad35161 100644 --- a/js/CommonDialogs.js +++ b/js/CommonDialogs.js @@ -46,18 +46,20 @@ const CommonDialogs = { xhr.onload = function () { switch (parseInt(this.responseText)) { case 0: - Notify.info("Upload complete."); + { + Notify.info("Upload complete."); - if (App.isPrefs()) - dijit.byId("feedTree").reload(); - else - Feeds.reload(); + if (App.isPrefs()) + dijit.byId("feedTree").reload(); + else + Feeds.reload(); - const icon = $$(".feed-editor-icon")[0]; + const icon = $$(".feed-editor-icon")[0]; - if (icon) - icon.src = icon.src.replace(/\?[0-9]+$/, "?" + new Date().getTime()); + if (icon) + icon.src = icon.src.replace(/\?[0-9]+$/, "?" + new Date().getTime()); + } break; case 1: Notify.error("Upload failed: icon is too big."); -- cgit v1.2.3