From: Jo-Philipp Wich Date: Tue, 20 Aug 2019 13:02:36 +0000 (+0200) Subject: luci-base: ui.js: also handle failed promises in createHandlerFn() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b0dde567ca79c328e62736e88317dd4a8459bb0d;p=project%2Fluci.git luci-base: ui.js: also handle failed promises in createHandlerFn() Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index ad1547fee2..633707b2b6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -2156,7 +2156,7 @@ return L.Class.extend({ if (t.blur) t.blur(); - Promise.resolve(fn.apply(ctx, arguments)).then(function() { + Promise.resolve(fn.apply(ctx, arguments)).finally(function() { t.classList.remove('spinning'); t.disabled = false; });