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` #345

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. action item does not have id property but action property, which means the idproperty 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