Receiving an error msg that reads, "Cannot read property 'indexOf' of undefined", but I'm not sure why it's undefined. Here's the code that's causing the issue:
if (req.user) {
swig.setFilter('userLikes', function(journeyPassportID) {
if (req.user.journeys_liked.indexOf(journeyPassportID) != -1) {
return 'liked';
}
});
Aucun commentaire:
Enregistrer un commentaire