Comparing version 2.4.1 to 2.4.2
@@ -28,2 +28,3 @@ /* | ||
import { bindContextThisArg } from "../../polyfill/polyfill"; | ||
import { isEmpty } from "js-utl"; | ||
export default withFunctionTrapExecutor(class CallTrapExecutor extends TrapExecutor { | ||
@@ -35,3 +36,3 @@ getTrapArgsArgumentsListIndex() { | ||
execute([target, property, receiver, propertyValue], before, around, after) { | ||
if (typeof propertyValue === "function") { | ||
if (typeof propertyValue === "function" && [before, around, after].some(advices => !isEmpty(advices))) { | ||
const superExecute = trapArgs => { | ||
@@ -38,0 +39,0 @@ return super.execute(trapArgs, before, around, after); |
{ | ||
"name": "pigretto", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "A JS helper to easily implement proxies, facades, lazy loading and monkey patching using an API with an AOP flavor.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -29,2 +29,3 @@ /* | ||
import { bindContextThisArg } from "../../polyfill/polyfill"; | ||
import { isEmpty } from "js-utl"; | ||
@@ -43,3 +44,6 @@ export default withFunctionTrapExecutor( | ||
) { | ||
if (typeof propertyValue === "function") { | ||
if ( | ||
typeof propertyValue === "function" && | ||
[before, around, after].some(advices => !isEmpty(advices)) | ||
) { | ||
const superExecute = trapArgs => { | ||
@@ -46,0 +50,0 @@ return super.execute(trapArgs, before, around, after); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3082664
31496