assets/js/log-in.js in dta_rapid-1.6.0 vs assets/js/log-in.js in dta_rapid-1.6.1

- old
+ new

@@ -1,15 +1,20 @@ + $(function () { - $('.js-log-in').text(localStorage.getItem('loggedIn') ? "My Account" : "Log in"); - $('.js-log-in').on('click', function (event) { - event.preventDefault(); + var _logMeIn = function () { var loggedIn = localStorage.getItem('loggedIn') === "true"; if (!loggedIn) { window.location.href = "/account_login.html" } else { window.location.href = "/my-account.html" } + } + + $('.js-log-in').on('click', function (event) { + event.preventDefault(); + _logMeIn(); }); + });