nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
640 stars 98 forks source link

Fix found action is always first item in `actions` #346

Closed faizalluthfi closed 3 years ago

faizalluthfi commented 3 years ago

This whoud fix const action always refers to first item in actions array because:

  1. actions item does not have id property but action, which means the id property value is undefined
  2. x,action value is a string and does not have action property too, which means the action property value is undefined too
  3. comparing undefined with undefined always returns true, then action constant will be always the first action in actions array
lupas commented 3 years ago

Hey @faizalluthfi, thanks for the PR!

I'll be having a look at it next week and ship this as soon as possible if it all looks good.

br, Pascal

lupas commented 3 years ago

@faizalluthfi Thanks a lot for this fix! I just shipped this with v7.0.2 :)

Thanks - Appreciate your effort!