Allow after patches to change the return value
This commit is contained in:
parent
1b75753a3d
commit
9dc424cc75
|
@ -70,7 +70,7 @@ export class Patcher {
|
|||
|
||||
for (const slavePatch of patch.children.filter(c => c.type === 'after')) {
|
||||
try {
|
||||
slavePatch.callback(this, arguments, retVal);
|
||||
slavePatch.callback(this, arguments, retVal, r => retVal = r);
|
||||
} catch (err) {
|
||||
Logger.err(`Patcher:${patch.id}`, err);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue