Unable to get data from chrome storage when building chrome extension

hello, i am following a tutorial on how to build a chrome extension - https://www.youtube.com/watch?v=0n809nd4Zu4

but the issue is that:

  • i am unable to retrieve data from chrome storage within popup.js
        chrome.storage.sync.get([currentVideo], (data) => {
            const currentVideoBookmarks = data[currentVideo] ? JSON.parse(data[currentVideo]) : [];
            viewBookmarks(currentVideoBookmarks);
          });

the code block return an empty array but return the saved data when i use it within contentScript.js.

  • i can retrieve in contentScript because the data is logged to the console.

  • i want the saved data to show in the popup

here is the gh: GitHub - nebulahh/chrome-extension-yt

nvm, i resolved it. i had to look into it well