Skip to content

Commit a9c9334

Browse files
fix(): fallback to empty options object if not provided
1 parent 954ed80 commit a9c9334

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/auth.guard.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ function createAuthGuard(type?: string | string[]): Type<CanActivate> {
3333
class MixinAuthGuard<TUser = any> implements CanActivate {
3434
@Optional()
3535
@Inject(AuthModuleOptions)
36-
protected options: AuthModuleOptions;
36+
protected options: AuthModuleOptions = {};
37+
3738
constructor(@Optional() options?: AuthModuleOptions) {
3839
this.options = options ?? this.options;
3940
if (!type && !this.options.defaultStrategy) {

0 commit comments

Comments
 (0)