From b2b6721a2f273a134097d2bcffe578e4db3dc3c1 Mon Sep 17 00:00:00 2001 From: Henning <leutz@pcsg.de> Date: Sun, 30 Mar 2025 16:21:42 +0200 Subject: [PATCH] fix: ensure onSuccess attribute is a function in login.js The commit ensures that the onSuccess attribute is a function, and it's successful execution before proceeding. This is implemented in bin/frontend/controls/login/Login.js. With this fix, potential errors from incorrectly set onSuccess attributes can be avoided. --- bin/frontend/controls/login/Login.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/frontend/controls/login/Login.js b/bin/frontend/controls/login/Login.js index 0ff17c7..5a0e0fa 100644 --- a/bin/frontend/controls/login/Login.js +++ b/bin/frontend/controls/login/Login.js @@ -357,8 +357,10 @@ define('package/quiqqer/frontend-users/bin/frontend/controls/login/Login', [ self.$hideSocialLoader(Form); self.$onSuccess(); - if (typeof self.getAttribute('onSuccess') === 'function') { - self.getAttribute('onSuccess')(self); + if ( + typeof self.getAttribute('onSuccess') === 'function' && + self.getAttribute('onSuccess')(self) + ) { return; } -- GitLab