Created
December 26, 2018 08:10
-
-
Save Lodo4ka/8aacbcf3a806224000b8c2df4f090d65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.$store.subscribe(function(mutation, state) { | |
// console.log("mutation.type", mutation.type); | |
// console.log("(mutation.payload", mutation.payload); | |
console.log(that.$router); | |
console.log(state); | |
if (mutation.type === "LOGIN" && state.userAuth.status) { | |
that.$router.push("/"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment