fix: ensafen invokePlugin
This commit is contained in:
parent
3c8cf9b4f0
commit
0286f02dad
|
@ -103,9 +103,12 @@ export default class Plugins {
|
|||
if (!this.hooks[hook]) {
|
||||
return undefined;
|
||||
}
|
||||
return this.hooks[hook]
|
||||
.find(({plugin: candidate}) => candidate === plugin)
|
||||
.fn(...(args.concat(this)));
|
||||
const candidate = this.hooks[hook]
|
||||
.find(({plugin: candidate}) => candidate === plugin);
|
||||
if (!candidate) {
|
||||
return undefined;
|
||||
}
|
||||
return candidate.fn(...(args.concat(this)));
|
||||
}
|
||||
|
||||
invokeReduce(hook, initial = {}, reducer = (r, o) => ({...r, ...o}), ...args) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user