From 2b32e72f58ab8149fdf5d618a7c7e4bd08d1d5ec Mon Sep 17 00:00:00 2001 From: Adrien Cacciaguerra Date: Wed, 1 Feb 2023 17:52:38 +0100 Subject: [PATCH] fix: allow empty constructor --- src/NodeJsFunctionBundleAnalyzerAspect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NodeJsFunctionBundleAnalyzerAspect.ts b/src/NodeJsFunctionBundleAnalyzerAspect.ts index 9479512..de8c020 100644 --- a/src/NodeJsFunctionBundleAnalyzerAspect.ts +++ b/src/NodeJsFunctionBundleAnalyzerAspect.ts @@ -32,8 +32,8 @@ interface NodeJsFunctionBundleAnalyzerAspectProps { class NodeJsFunctionBundleAnalyzerAspect implements IAspect { private customFunctionConstructName: string | undefined; - constructor({ customFunctionConstruct }: NodeJsFunctionBundleAnalyzerAspectProps) { - this.customFunctionConstructName = customFunctionConstruct?.prototype.constructor.name; + constructor(props?: NodeJsFunctionBundleAnalyzerAspectProps) { + this.customFunctionConstructName = props?.customFunctionConstruct?.prototype.constructor.name; } async visit(node: IConstruct): Promise {