yt-devmeetup-vue-firebase icon indicating copy to clipboard operation
yt-devmeetup-vue-firebase copied to clipboard

Using '.id' atttribute in a simply array within the State

Open matthiku opened this issue 7 years ago • 0 comments

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...

matthiku avatar Nov 12 '17 15:11 matthiku