Allow after patches to change the return value

This commit is contained in:
Samuel Elliott 2018-04-14 15:17:02 +01:00
parent 1b75753a3d
commit 9dc424cc75
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}