storage.sync.get() returning undefined only on FIrefox

Viewed 16

When I call the getter, it returns undefined on Firefox, it should return an empty object. It returns undefined only on Firefox, on Chrome it works perfectly fine and returns an empty object.

chrome.storage.sync.get(res => {
  console.log(res);
});

// Firefox: undefined
// Chrome: {}

My web extension is supposed to work on both Chrome and Firefox.

Also, my web extension does set storage.sync before this, I just don't think I need to add that to my example since Firefox returns undefined no matter what and chrome returns what it should.

0 Answers
Related