mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Don't rely on hiddenDOMWindow in plugins.js
This commit is contained in:
parent
437f70190d
commit
cd813171e7
1 changed files with 9 additions and 1 deletions
|
|
@ -339,7 +339,15 @@ Zotero.Plugins = new function () {
|
|||
*/
|
||||
this.getIconURI = async function (id, idealSize) {
|
||||
var addon = await AddonManager.getAddonByID(id);
|
||||
return AddonManager.getPreferredIconURL(addon, idealSize, Services.appShell.hiddenDOMWindow);
|
||||
return AddonManager.getPreferredIconURL(
|
||||
addon,
|
||||
idealSize,
|
||||
// This window argument is optional, only used for determining
|
||||
// whether to get the hiDPI icon.
|
||||
// Use the main window (which we always have, except on non-macOS),
|
||||
// falling back to the hidden window (which we always have on macOS).
|
||||
Zotero.getMainWindow() || Services.appShell.hiddenDOMWindow
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue