Bug 1149880 - avoid readinglist item races logging unhandled promise exceptions. r=dolske

This commit is contained in:
Mark Hammond 2015-04-07 11:43:22 +10:00
parent b26e8d6034
commit 6cbf858a7b

View File

@ -469,7 +469,10 @@ let RLSidebar = {
this.activeItem = null;
} else {
ReadingList.itemForURL(msg.url).then(item => {
this.activeItem = this.itemNodesById.get(item.id);
let node;
if (item && (node = this.itemNodesById.get(item.id))) {
this.activeItem = node;
}
});
}
}