Skip to content

Commit

Permalink
fix(core): resolve compilation errors for latest Typescript 1.9 (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikerman authored and jelbourn committed Jun 3, 2016
1 parent 63f43bd commit e366fa0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core/overlay/position/connected-position-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/core/overlay/position/global-position-strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/core/portal/portal-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>): void {
let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve();
let maybeDetach = this.hasAttached() ? this.detach() : Promise.resolve(null);

maybeDetach.then(() => {
if (p != null) {
Expand Down

0 comments on commit e366fa0

Please sign in to comment.