I have this code:
function setCurrentDomain(result) {
console.log(result);
domainExclude = result.domain;
console.log("Domain " + domainExclude);
}
function setCurrentVersion(result) {
console.log(result);
versionHeader = result.version;
console.log("Version " + versionHeader);
}
function onError(error) {
console.log(`Error: ${error}`);
}
console.log("Start Main");
var getting = browser.storage.local.get("version");
getting.then(setCurrentVersion, onError);
var getting = browser.storage.local.get("domain");
getting.then(setCurrentDomain, onError);
The variable domainExclude is set correctly and the variable versionHeader is undefined. I can’t see any difference in the code of the two functions or any error in the file containing the values that should be given.
Does anyone have any ideas?