Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/auto-aspect-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export class AutoAspectExecutor implements OnModuleInit {
private applyLazyDecorator(lazyDecorator: LazyDecorator, instanceWrapper: InstanceWrapper<any>) {
const target = instanceWrapper.isDependencyTreeStatic()
? instanceWrapper.instance
: instanceWrapper.metatype.prototype;
: instanceWrapper.metatype?.prototype;

if (target) {
console.debug('[applyLazyDecorator] not found target');
}

// Use scanFromPrototype for support nestjs 8
const propertyKeys = this.metadataScanner.scanFromPrototype(
Expand Down