From b0dde567ca79c328e62736e88317dd4a8459bb0d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 20 Aug 2019 15:02:36 +0200 Subject: luci-base: ui.js: also handle failed promises in createHandlerFn() Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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; }); -- cgit v1.2.3