Bug 1320557 - Prevent broken UI from invalid permission states. r=Gijs

MozReview-Commit-ID: FxmCHoLx0lE

--HG--
extra : rebase_source : 562af940feb727d7d68e034790a9d9358768847e
This commit is contained in:
Johann Hofmann 2017-01-06 10:02:58 +01:00
parent 4e225590bc
commit f41adcc377
2 changed files with 4 additions and 2 deletions

View File

@ -173,7 +173,9 @@ function onRadioClick(aPartId) {
function setRadioState(aPartId, aValue) {
var radio = document.getElementById(aPartId + "#" + aValue);
radio.radioGroup.selectedItem = radio;
if (radio) {
radio.radioGroup.selectedItem = radio;
}
}
function initIndexedDBRow() {

View File

@ -186,7 +186,7 @@ this.SitePermissions = {
case this.BLOCK:
return gStringBundle.GetStringFromName("block");
default:
throw new Error("unknown permission state");
return null;
}
}
};