Also pass settings to Extensions (#3410)

* Also pass settings to Extensions

* Swap order of settings and logger
This commit is contained in:
Jorge Schrauwen 2020-04-23 22:02:00 +02:00 committed by GitHub
parent d073a7fc7a
commit f0f7905782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ class Controller {
const extensions = fs.readdirSync(extensionPath).filter((f) => f.endsWith('.js'));
for (const extension of extensions) {
const Extension = require(path.join(extensionPath, extension.split('.')[0]));
this.extensions.push(new Extension(...args, logger));
this.extensions.push(new Extension(...args, settings, logger));
}
}
}