diff --git a/src/core/overlay/position/connected-position-strategy.ts b/src/core/overlay/position/connected-position-strategy.ts index 52bf421f18ba..a3b1cb482a4e 100644 --- a/src/core/overlay/position/connected-position-strategy.ts +++ b/src/core/overlay/position/connected-position-strategy.ts @@ -68,14 +68,14 @@ export class ConnectedPositionStrategy implements PositionStrategy { // If the overlay in the calculated position fits on-screen, put it there and we're done. if (this._willOverlayFitWithinViewport(overlayPoint, overlayRect, viewportRect)) { this._setElementPosition(element, overlayPoint); - return Promise.resolve(); + return Promise.resolve(null); } } // TODO(jelbourn): fallback behavior for when none of the preferred positions fit on-screen. // For now, just stick it in the first position and let it go off-screen. this._setElementPosition(element, firstOverlayPoint); - return Promise.resolve(); + return Promise.resolve(null); } withFallbackPosition( diff --git a/src/core/overlay/position/global-position-strategy.ts b/src/core/overlay/position/global-position-strategy.ts index a5ed7cda84d6..d14f6c203a1f 100644 --- a/src/core/overlay/position/global-position-strategy.ts +++ b/src/core/overlay/position/global-position-strategy.ts @@ -103,7 +103,7 @@ export class GlobalPositionStrategy implements PositionStrategy { applyCssTransform(element, `${tranlateX} ${translateY}`); - return Promise.resolve(); + return Promise.resolve(null); } /** Reduce a list of translate values to a string that can be used in the transform property */ diff --git a/src/core/portal/portal-directives.ts b/src/core/portal/portal-directives.ts index fbc5abc472d6..689b36468311 100644 --- a/src/core/portal/portal-directives.ts +++ b/src/core/portal/portal-directives.ts @@ -90,7 +90,7 @@ export class PortalHostDirective extends BasePortalHost { /** Detatches the currently attached Portal (if there is one) and attaches the given Portal. */ private _replaceAttachedPortal(p: Portal): void { - let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(); + let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(null); maybeDetach.then(() => { if (p != null) {