yt-devmeetup-vue-firebase
yt-devmeetup-vue-firebase copied to clipboard
Using '.id' atttribute in a simply array within the State
In the following line: https://github.com/academind/yt-devmeetup-vue-firebase/blob/f2c1a463810d402ef481d92d6b5be61ec4148e40/src/store/user/index.js#L18 you are using 'meetup.id' in the closure; however the registeredMeetups is a simple array of ids!
So instead of this, you should use:
registeredMeetups.splice(registeredMeetups.findIndex(meetup => meetup === payload), 1)
Same in line 10.
This wasn't discovered because it still works as lon as you don't have more than one registration in that array!
I should write a pull request, but I'm not too familiar yet with that process...