From ce4ce8ce9511c557d7916b45103194c9edc69b8b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 5 Oct 2020 21:12:07 -0400 Subject: [PATCH] pad_impexp: Delete unnecessary `importFailed` wrapper --- src/static/js/pad_impexp.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/static/js/pad_impexp.js b/src/static/js/pad_impexp.js index a44c69d8a..867971045 100644 --- a/src/static/js/pad_impexp.js +++ b/src/static/js/pad_impexp.js @@ -51,7 +51,7 @@ const padimpexp = (() => { return; } currentImportTimer = null; - importFailed('Request timed out.'); + importErrorMessage('Request timed out.'); importDone(); }, 25000); // time out after some number of seconds $('#importsubmitinput').attr( @@ -71,10 +71,6 @@ const padimpexp = (() => { return ret; }; - const importFailed = (msg) => { - importErrorMessage(msg); - }; - const importDone = () => { $('#importsubmitinput').removeAttr('disabled').val(html10n.get('pad.impexp.importbutton')); window.setTimeout(() => { @@ -196,7 +192,7 @@ const padimpexp = (() => { handleFrameCall: (directDatabaseAccess, status) => { if (directDatabaseAccess === 'undefined') directDatabaseAccess = false; if (status !== 'ok') { - importFailed(status); + importErrorMessage(status); } else { $('#import_export').removeClass('popup-show'); }