luci-base: luci.js: don't abort finished xhr objects
authorJo-Philipp Wich <jo@mein.io>
Fri, 7 Jun 2019 10:51:27 +0000 (12:51 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 7 Jul 2019 13:36:26 +0000 (15:36 +0200)
Calling abort() on a finished xhr object will clear properties such
as status which can confuse code relying on legacy LuCI request
helper functions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/luci.js

index 853bbfc05d5de5c2d954b3ece976e31b14d5300c..1e1c38bbedce350a2d8e65e394b91ef1c4899733 100644 (file)
                                        .then(resolveFn.bind(this, response))
                                        .catch(rejectFn.bind(this));
                        }
-
-                       try {
-                               xhr.abort();
-                       }
-                       catch(e) {}
                },
 
                get: function(url, options) {