title: Vue.js - Can't access computed properties from methods
body: <p>I have a login method inside a Vue component that uses firebase to sign in a user. I'm using computed properties <code>user</code>, <code>message</code>, and <code>hasErrors</code>. When this method runs, It goes into the <code>catch</code> function, but this error comes up: 
  <code>Uncaught TypeError: Cannot set property 'message' of undefined</code>. I've tried changing the vuex state directly (because that's what the computed prop does), but this gives the same error. Here is the method I'm using:</p>
  
  <pre><code>login: function (event) {
    // ... more stuff
    // Sign-in the user with the email and password
    firebase.auth().signInWithEmailAndPassword(this.email, this.password)
      .then(function (data) {
        this.user = firebase.auth().currentUser
      }).catch(function (error) {
        this.message = error.message
        this.hasErrors = true
      })
    // ...
  }
  </code></pre>
  
  <p>Here's what the computed prop looks like: </p>
  
  <pre><code>message: {
    get () {
      return this.auth.message // mapState(['auth'])
    },
    set (value) {
      this.$store.commit('authMessage', value)
    }
  }
  </code></pre>
  
  <p>I'm pretty sure the problem has to do with it being inside a <code>Promise</code>.
  So how can I access computed properties within the firebase <code>Promise</code>?</p>