For this task, I'm trying to add storyId to a favorites array when a post's checkbox is clicked. Like so:

So I've got that part working. However, when I uncheck the checkbox, the same storyId is pushed to the array:

I've tried to create this using if/else statements:
async saveFavStory(storyId) {
console.log(storyId);
if (this.checked = "true") {
this.favorites.push(storyId);
console.log(this);
} else {
this.favorites.pop(storyId);
console.log(this)
};
};
If someone could explain how to write this so that the storyId is removed from the favorites array when the checkbox is unchecked it would be much appreciated!