зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380575 - Fix aListItem is undefined when uninstalling from Androud about:addons page. r=mixedpuppy
MozReview-Commit-ID: HrJ17Tu81Hm --HG-- extra : rebase_source : 537f3280c55b10597a88087ee70b98fccfedc0a2
This commit is contained in:
Родитель
e3c2b4089a
Коммит
dd6ab49bcd
|
@ -122,7 +122,13 @@ function onPopState(aEvent) {
|
|||
// Called when back/forward is used to change the state of the page
|
||||
if (aEvent.state) {
|
||||
// Show the detail page for an addon
|
||||
Addons.showDetails(Addons._getElementForAddon(aEvent.state.id));
|
||||
const listItem = Addons._getElementForAddon(aEvent.state.id);
|
||||
if (listItem) {
|
||||
Addons.showDetails(listItem);
|
||||
} else {
|
||||
// If the addon doesn't exist anymore, go back in the history.
|
||||
history.back();
|
||||
}
|
||||
} else {
|
||||
// Clear any previous detail addon
|
||||
let detailItem = document.querySelector("#addons-details > .addon-item");
|
||||
|
|
Загрузка…
Ссылка в новой задаче