Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Bug 1097838 - ReferenceError: reference to undefined property permiss…
Browse files Browse the repository at this point in the history
…ions[private-browsing]
  • Loading branch information
erikvold committed Jun 4, 2015
1 parent 931569a commit b003609
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/sdk/self.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const metadata = options.metadata || {};
const permissions = metadata.permissions || {};
const isPacked = rootURI && rootURI.indexOf("jar:") === 0;

const isPrivateBrowsingSupported = 'private-browsing' in permissions &&
permissions['private-browsing'] === true;

const uri = (path="") =>
path.includes(":") ? path : addonDataURI + path.replace(/^\.\//, "");

Expand Down Expand Up @@ -55,4 +58,4 @@ exports.data = Object.freeze({
return readURISync(uri(path));
}
});
exports.isPrivateBrowsingSupported = permissions['private-browsing'] === true;
exports.isPrivateBrowsingSupported = isPrivateBrowsingSupported;

0 comments on commit b003609

Please sign in to comment.