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; };