Не работает условие в vuefire
Не работает условие в vuefire, но при выводе логина в консоль все отображается
var app = new Vue({
el: '#app',
data: {
checkLogin: '',
checkPassword: '',
result: '',
isAutch: false,
user: []
},
methods:
{
autch: function()
{
db.collection('users').doc(this.checkLogin)
.get().then(function(doc)
{
if(doc.exists)
{
this.user = doc.data()
if(this.user.login == this.checkLogin)
{
if(this.user.password == this.checkPassword)
{
console.log("ok")
}
}
}
})
}
}
})