fix(editor): 由于有可选参数,所以将after hook的返回值放到第一个参数
This commit is contained in:
@@ -53,7 +53,7 @@ const doAction = async (
|
||||
let returnValue: any = await fn(beforeArgs, sourceMethod.bind(scope));
|
||||
|
||||
for (const afterMethod of scope.pluginOptionsList[afterMethodName]) {
|
||||
returnValue = await afterMethod(...beforeArgs, returnValue);
|
||||
returnValue = await afterMethod(returnValue, ...beforeArgs);
|
||||
|
||||
if (isError(returnValue)) throw returnValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user