why filter
is not working with this.userId
but working with hard code value "admin"
? How can I fix this?
computed: {
UidMessages: function() {
return this.Messages.filter(function(m) {
return m.to == this.userId;
})
}
},
And it does work =>
computed: {
AMesseg: function() {
return this.Messages.filter(function(m) {
return m.to== "admin"
})
}
},
I think it's because of the comparison of the strings
Thanks.