From b8aa69448a7b4a75d3a272f336759c5ac29ea005 Mon Sep 17 00:00:00 2001 From: mirusu400 Date: Thu, 27 Apr 2023 15:25:16 +0900 Subject: [PATCH] Fix: Automatic renew session (#16) --- src/routes/root.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/routes/root.js b/src/routes/root.js index 12e14c8..b2c45cb 100644 --- a/src/routes/root.js +++ b/src/routes/root.js @@ -7,7 +7,13 @@ const renewSession = () => { // Call extern function // The extern function defines in HTML - sessionExtensionReq(); + const sessionRenewFunction = + typeof(sessionExtensionReq) == 'function' ? sessionExtensionReq : + typeof(sessionExtensionReq1) == 'function' ? sessionExtensionReq1 : + undefined + + if (sessionRenewFunction) + sessionRenewFunction(); return; };