Oh my. I think I know your problem, but lets do a little test first.
Given this code:
console.log('a');
chrome.storage.local.get(..., () => {
console.log('b');
});
console.log('c');
What do you think is the guaranteed order in which a
, b
and c
will be logged?