I encountered an issue in vscode stating "Type 'unknown' must have a 'Symbol.iterator' method that returns an iterator." for the following line of code:
bookmarks.push(...this.$auth.user?.bookmarks);
let bookmarks = [];
if(this.$auth.user?.bookmarks) {
bookmarks.push(...this.$auth.user?.bookmarks);
}
if(bookmarks.length>0) {
How can I fix this error? When I run
console.log(this.$auth.user?.bookmarks)
, it returns an empty array (length of 0).