Skip to content

Commit 0584cdf

Browse files
devversionkara
authored andcommitted
fix(overlay): detach method returns undefined (#7449)
Fixes #7408
1 parent c1f6ea1 commit 0584cdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cdk/overlay/overlay-ref.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ export class OverlayRef implements PortalHost {
8585

8686
/**
8787
* Detaches an overlay from a portal.
88-
* @returns Resolves when the overlay has been detached.
88+
* @returns The portal detachment result.
8989
*/
90-
detach(): Promise<any> {
90+
detach(): any {
9191
this.detachBackdrop();
9292

9393
// When the overlay is detached, the pane element should disable pointer events.
@@ -99,7 +99,7 @@ export class OverlayRef implements PortalHost {
9999
this._config.scrollStrategy.disable();
100100
}
101101

102-
let detachmentResult = this._portalHost.detach();
102+
const detachmentResult = this._portalHost.detach();
103103

104104
// Only emit after everything is detached.
105105
this._detachments.next();

0 commit comments

Comments
 (0)