Ensure high-dpi icons are loaded in React components

This commit is contained in:
Adomas Venčkauskas 2019-01-21 11:01:04 +02:00
parent 90a70f7c31
commit f5c4fb06e1
7 changed files with 83 additions and 66 deletions

View file

@ -26,7 +26,12 @@
EXPORTED_SYMBOLS = ["ConcurrentCaller"];
if (!(typeof process === 'object' && process + '' === '[object process]')) {
Components.utils.import('resource://zotero/require.js');
// Components.utils.import('resource://zotero/require.js');
// Not using Cu.import here since we don't want the require module to be cached
// for includes within ZoteroPane or other code where we want the window instance available to modules.
Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
.getService(Components.interfaces.mozIJSSubScriptLoader)
.loadSubScript('resource://zotero/require.js');
var Promise = require('resource://zotero/bluebird.js');
} else {
Promise = require('bluebird');