maneira limpa de lidar com indefinido no armazenamento Chrome Local Get

// by passing an object you can define default values e.g.: [] IMPORTANT!
chrome.storage.local.get({userKeyIds: []}, function (result) {

    var userKeyIds = result.userKeyIds;

});
Old-fashioned Ocelot