Skip to content

Instantly share code, notes, and snippets.

@Lodo4ka
Created December 26, 2018 08:10
Show Gist options
  • Save Lodo4ka/8aacbcf3a806224000b8c2df4f090d65 to your computer and use it in GitHub Desktop.
Save Lodo4ka/8aacbcf3a806224000b8c2df4f090d65 to your computer and use it in GitHub Desktop.
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