From 3ac5538aa756b211dc2a13e38e79b4c10b403825 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Fri, 27 Oct 2023 18:45:40 +0200 Subject: [PATCH] [mirotalksfu] - fix typo --- public/js/Room.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/js/Room.js b/public/js/Room.js index a7ac9127..dd53e008 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -2143,7 +2143,7 @@ function handleRoomClientEvents() { if (survey && survey.enabled) { leaveFeedback(); } else { - redirect && redirect.enabled ? openURL(redirect.url) : openURL('/newroom'); + redirectOnLeave(); } }); } @@ -2169,11 +2169,15 @@ function leaveFeedback() { if (result.isConfirmed) { openURL(survey.url); } else { - openURL('/newroom'); + redirectOnLeave(); } }); } +function redirectOnLeave() { + redirect && redirect.enabled ? openURL(redirect.url) : openURL('/newroom'); +} + function userLog(icon, message, position, timer = 3000) { const Toast = Swal.mixin({ background: swalBackground,