Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Fix compilation errors for latest Typescript 1.9 #624

Merged
merged 1 commit into from
Jun 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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