How can i add a new field to a repeatable component

System Information
  • 3.3.3:
  • windows:
  • mongoDB:
  • 12.18.3:
  • 6.14.6:

hi i have a data type called special events and i have a repeatable component name suggestions in it which each one of the components includes a user (relation) and a hasWon boolean . i want to be able to add new suggestions to my special event . what i did was something like this
`

const event = await strapi.query(‘special-event’).findOne({ _id: data.eventid })

 let updatedSugesstions = [
                            ...event.suggestions,
                            {
                                hasWon: false,
                                user: user,
                            }
                        ];
await strapi.query('special-event').update({ _id: data.eventid }, {
                            suggestions: updatedSugesstions
                        })

this code workes but it only works when i have no suggestions in my content type but when i have even 1 suggestion it deosnt work im really confused
any help would be appreciated