luci-base: ui.js: also handle failed promises in createHandlerFn()
authorJo-Philipp Wich <jo@mein.io>
Tue, 20 Aug 2019 13:02:36 +0000 (15:02 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 Sep 2019 13:28:16 +0000 (15:28 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index ad1547fee2648f7b0c7cbdd511edc0d424182471..633707b2b6e693543809db1b79251a13ab8e32d2 100644 (file)
@@ -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;
                        });