@amandam Maybe I said it wrong. The browser console shows me badgeIds and memberId. The EditorX Velo console shows me nothing but the error.
Where does it think you are using member._id as an object?
Line 144
//////// Hide/Show based on badges
const options = {
fieldsets: [ 'FULL' ]
}
$w.onReady(function () {
currentMember.getMember(options)
.then((member) => {
144 > getMemberBadges(member._id).then((badges) =>{
// console.log(member)
if(badges[0].badgeIds.includes('cc23f640-4b88-41d2-a27b-548a11388416')){
showCherry();
}else {
noCherry()
}
console.log(badges)
})
console.log(member._id);
return member._id;
})
.catch((error) => {
console.error(error);
});
});
function showCherry(){
$w('#LikeButtonOn').show()
$w('#LikeButtonOff').hide()
}
function noCherry(){
$w('#LikeButtonOff').show()
$w('#LikeButtonOn').hide()
}
