I'm developing a Chrome extension using VueJS. I store some data using chrome.storage.sync and I want to retrieve it later than iterate through it.
This is the code of the method that I use to get the data.
getSpeedDials() {
  let speedDials = [] 
  chrome.storage.sync.get('speedDials', function(value)  { 
    if (value.hasOwnProperty('speedDials')) { 
      console.log(value.speedDials) 
      speedDials = value.speedDials 
    } 
  }); 
return speedDials 
}
The console.log(value.speedDials) outputs the expected result, an array that contains several objects. But the return is an empty array. How can I debug this?
 
     
     
    