You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is impossible for the user of aspect.js to completely handle around advice and prevent the advice from executing twice. Note comments in code block from masterlib/src/advices/sync_advices.ts below:
export class AroundAdvice extends Advice { // line 20
wove(target: Function, metadata: Metadata) {
this.advice.bind(this.context, metadata).apply(null, metadata.method.args); // calls advice, user can set metadata.method.proceed to false
this.invoke(target, metadata); // if metadata.method.proceed is false, invocation is skipped as it should be
this.advice.bind(this.context, metadata).apply(null, metadata.method.args); // if metadata.method.proceed is false, advice is _still_ called -- this is inconvenient!
return metadata.method.result;
}
}
The text was updated successfully, but these errors were encountered:
It is impossible for the user of
aspect.js
to completely handle around advice and prevent the advice from executing twice. Note comments in code block frommaster
lib/src/advices/sync_advices.ts
below:The text was updated successfully, but these errors were encountered: