summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorJohan Preynat <johan.preynat@gmail.com>2016-05-04 10:30:11 +0200
committerJohan Preynat <johan.preynat@gmail.com>2016-05-04 10:30:11 +0200
commitee8d35df7a26a130a48cdbddd55a26b354378682 (patch)
treec0a1d69d96f78db819dd27dc41b3be8b4f409ae2 /lib/plugins
parentbe411cd5ff2d5bfc013bf2510cd1496ee343c09a (diff)
downloadgitbook-ee8d35df7a26a130a48cdbddd55a26b354378682.zip
gitbook-ee8d35df7a26a130a48cdbddd55a26b354378682.tar.gz
gitbook-ee8d35df7a26a130a48cdbddd55a26b354378682.tar.bz2
Update Plugins.listResources() to use the prepared resources list
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/listResources.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/plugins/listResources.js b/lib/plugins/listResources.js
index 4a73a2c..fe31b5a 100644
--- a/lib/plugins/listResources.js
+++ b/lib/plugins/listResources.js
@@ -11,13 +11,13 @@ var PLUGIN_RESOURCES = require('../constants/pluginResources');
@param {String} type
@return {Map<String:List<{url, path}>}
*/
-function listResources(plugins, type) {
+function listResources(plugins, resources) {
return plugins.reduce(function(result, plugin) {
- var npmId = plugin.getNpmID();
- var resources = plugin.getResources(type);
+ var npmId = plugin.getNpmID();
+ var pluginResources = resources.get(plugin.getName());
PLUGIN_RESOURCES.forEach(function(resourceType) {
- var assets = resources.get(resourceType);
+ var assets = pluginResources.get(resourceType);
if (!assets) return;
var list = result.get(resourceType) || Immutable.List();