From 582cb20b72b8f6f30f1033a5ce569021d0618544 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Thu, 18 Aug 2022 15:27:02 +0200 Subject: [PATCH] rename Handler functions to do not have a data and methods property error --- public/js/components/Fetch.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/components/Fetch.js b/public/js/components/Fetch.js index ce09b4efd..32d5616d0 100644 --- a/public/js/components/Fetch.js +++ b/public/js/components/Fetch.js @@ -65,9 +65,9 @@ export const CoreFetchCmpt = { if (apiFunctionResult instanceof Promise) { apiFunctionResult - .then(this.success) // on success - .catch(this.error) // on error - .then(this.finally); // finally in any case + .then(this.successHandler) // on success + .catch(this.errorHandler) // on error + .finally(this.finallyHandler); // finally in any case } else // otherwise display an error { @@ -90,19 +90,19 @@ export const CoreFetchCmpt = { /** * */ - success: function(response) { + successHandler: function(response) { this.$emit('dataFetched', response.data); // trigger the event dataFetched }, /** * */ - error: function(error) { + errorHandler: function(error) { this.setError(error.message); }, /** * */ - finally: function() { + finallyHandler: function() { this.loading = false; // loading ended } },