mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): 由于有可选参数,所以将after hook的返回值放到第一个参数
This commit is contained in:
parent
8e004f9766
commit
9526c44d16
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user