diff options
Diffstat (limited to 'browser/components/extensions/parent/ext-browser.js')
-rw-r--r-- | browser/components/extensions/parent/ext-browser.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/browser/components/extensions/parent/ext-browser.js b/browser/components/extensions/parent/ext-browser.js index 7b01d15101..d2f72d4f46 100644 --- a/browser/components/extensions/parent/ext-browser.js +++ b/browser/components/extensions/parent/ext-browser.js @@ -67,8 +67,12 @@ global.openOptionsPage = extension => { return Promise.reject({ message: "No browser window available" }); } - if (extension.manifest.options_ui.open_in_tab) { - window.switchToTabHavingURI(extension.manifest.options_ui.page, true, { + const { optionsPageProperties } = extension; + if (!optionsPageProperties) { + return Promise.reject({ message: "No options page" }); + } + if (optionsPageProperties.open_in_tab) { + window.switchToTabHavingURI(optionsPageProperties.page, true, { triggeringPrincipal: extension.principal, }); return Promise.resolve(); |