Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. mutations: {
  2. toggleAvailability(state, book) {
  3. const index = state.books.findIndex(b => b.id === book.id);
  4. state.books[index].available = !state.books[index].available;
  5. }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement