From ab57ad3b7547089eee9a2fb4484c370ef6730c2a Mon Sep 17 00:00:00 2001 From: Mathias Biilmann Christensen Date: Wed, 6 Sep 2017 10:04:38 -0700 Subject: Fix issue with always redirecting to /admin when logged in --- src/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/app.js b/src/js/app.js index 0a7084a..31623bb 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,5 +1,5 @@ // JS Goes here - ES6 supported -if (window.netlifyIdentity) { +if (window.netlifyIdentity && !window.netlifyIdentity.currentUser()) { window.netlifyIdentity.on('login', () => { document.location.href = '/admin/'; }); -- cgit v1.3