Skip to content

Commit

Permalink
fix(editor): 由于有可选参数,所以将after hook的返回值放到第一个参数
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen authored and jia000 committed Apr 22, 2022
1 parent 8e004f9 commit 9526c44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/src/services/BaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9526c44

Please sign in to comment.