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: resolve errors w/ Closure Compiler #659

Merged
merged 1 commit into from
Jun 10, 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
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];