Bug 1413098 - part3 : fix returning wrong result from SpecialPowers.getPrivilegedProps. r=jmaher

If result is zero, getPrivilegedProps() would incorrectly return null.

MozReview-Commit-ID: 57JMaFwDpGW

--HG--
extra : rebase_source : 12c6e4fa68d1b5c320c142ab13f7abf200dd38ac
extra : histedit_source : a28e569bc561ce20cbd0722bc1b0cd3c81327f2e
This commit is contained in:
Alastor Wu 2017-12-13 15:50:23 -06:00
parent fd5dcc6ba4
commit e8940443d7

View File

@ -1717,7 +1717,7 @@ SpecialPowersAPI.prototype = {
var parts = props.split(".");
for (var i = 0; i < parts.length; i++) {
var p = parts[i];
if (obj[p]) {
if (obj[p] != undefined) {
obj = obj[p];
} else {
return null;