mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Fixed bugs with plugin install
This commit is contained in:
+6
-1
@@ -124,7 +124,12 @@ function itteratePlugins(plugins) {
|
||||
// Add each plugin folder to the allowed import path so that they can import our
|
||||
// internal dependancies.
|
||||
Object.keys(plugins).forEach((type) => itteratePlugins(plugins[type]).forEach((plugin) => {
|
||||
amp.enableForDir(path.dirname(plugin.path));
|
||||
|
||||
// The plugin may be remote, and therefore not installed. We check here if the
|
||||
// plugin path is available before trying to monkeypatch it's require path.
|
||||
if (plugin.path) {
|
||||
amp.enableForDir(path.dirname(plugin.path));
|
||||
}
|
||||
}));
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user