Skip to content

Commit 3a3bdf4

Browse files
committed
fix(cdk/dialog): use config injector if provided
1 parent fd2811b commit 3a3bdf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cdk/dialog/dialog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ export class Dialog implements OnDestroy {
308308
dialogRef: DialogRef<R, C>,
309309
dialogContainer: BasePortalOutlet,
310310
): Injector {
311-
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
311+
const userInjector = config.injector ?? config.viewContainerRef?.injector;
312312
const providers: StaticProvider[] = [
313313
{provide: DIALOG_DATA, useValue: config.data},
314314
{provide: DialogRef, useValue: dialogRef},

0 commit comments

Comments
 (0)