Skip to content

Commit

Permalink
Fix issue with always redirecting to /admin when logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
biilmann committed Sep 6, 2017
1 parent 2620084 commit ab57ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/app.js
Original file line number Diff line number Diff line change
@@ -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/';
});
Expand Down

0 comments on commit ab57ad3

Please sign in to comment.