Skip to content

Commit

Permalink
fix: resolve errors w/ Closure Compiler. (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn committed Jun 10, 2016
1 parent ce27341 commit fbdb35b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/components/icon/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export {MdIconRegistry} from './icon-registry';
/** Exception thrown when an invalid icon name is passed to an md-icon component. */
export class MdIconInvalidNameError extends MdError {
constructor(iconName: string) {
super(`Invalid icon name: "${name}"`);
super(`Invalid icon name: "${iconName}"`);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/progress-circle/progress-circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ function clamp(v: number) {
* Returns the current timestamp either based on the performance global or a date object.
*/
function now() {
if (typeof performance !== 'undefined' && performance.now) {
return performance.now();
if (window.performance && window.performance.now) {
return window.performance.now();
}
return Date.now();
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/errors/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
export class MdError extends Error {
constructor(value: string) {
super();
super.message = value;
this.message = value;
}
}
35 changes: 18 additions & 17 deletions src/core/overlay/overlay-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ let defaultPositionList = [
];


/**
* Directive applied to an element to make it usable as an origin for an Overlay using a
* ConnectedPositionStrategy.
*/
@Directive({
selector: '[overlay-origin]',
exportAs: 'overlayOrigin',
})
export class OverlayOrigin {
constructor(private _elementRef: ElementRef) { }

get elementRef() {
return this._elementRef;
}
}



/**
* Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.
*/
Expand Down Expand Up @@ -86,21 +104,4 @@ export class ConnectedOverlayDirective implements OnInit, OnDestroy {
}


/**
* Directive applied to an element to make it usable as an origin for an Overlay using a
* ConnectedPositionStrategy.
*/
@Directive({
selector: '[overlay-origin]',
exportAs: 'overlayOrigin',
})
export class OverlayOrigin {
constructor(private _elementRef: ElementRef) { }

get elementRef() {
return this._elementRef;
}
}


export const OVERLAY_DIRECTIVES = [ConnectedOverlayDirective, OverlayOrigin];

0 comments on commit fbdb35b

Please sign in to comment.