We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f211ef4 commit 78f9c41Copy full SHA for 78f9c41
src/microplugin.js
@@ -74,18 +74,19 @@
74
}
75
76
while (queue.length) {
77
- self.loadPlugin(queue.shift());
+ self.require(queue.shift());
78
79
};
80
81
Interface.prototype.loadPlugin = function(name) {
82
- if (!Interface.plugins.hasOwnProperty(name)) {
83
- throw new Error('Unable to find "' + name + '" plugin');
84
- }
85
var self = this;
86
var plugins = self.plugins;
87
var plugin = Interface.plugins[name];
88
+ if (!Interface.plugins.hasOwnProperty(name)) {
+ throw new Error('Unable to find "' + name + '" plugin');
+ }
89
+
90
plugins.requested[name] = true;
91
plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
92
plugins.names.push(name);
0 commit comments