Skip to content

Commit fbdb35b

Browse files
authoredJun 10, 2016
fix: resolve errors w/ Closure Compiler. (#659)
1 parent ce27341 commit fbdb35b

File tree

4 files changed

+22
-21
lines changed

4 files changed

+22
-21
lines changed
 

‎src/components/icon/icon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export {MdIconRegistry} from './icon-registry';
1818
/** Exception thrown when an invalid icon name is passed to an md-icon component. */
1919
export class MdIconInvalidNameError extends MdError {
2020
constructor(iconName: string) {
21-
super(`Invalid icon name: "${name}"`);
21+
super(`Invalid icon name: "${iconName}"`);
2222
}
2323
}
2424

‎src/components/progress-circle/progress-circle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ function clamp(v: number) {
251251
* Returns the current timestamp either based on the performance global or a date object.
252252
*/
253253
function now() {
254-
if (typeof performance !== 'undefined' && performance.now) {
255-
return performance.now();
254+
if (window.performance && window.performance.now) {
255+
return window.performance.now();
256256
}
257257
return Date.now();
258258
}

‎src/core/errors/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
export class MdError extends Error {
77
constructor(value: string) {
88
super();
9-
super.message = value;
9+
this.message = value;
1010
}
1111
}

‎src/core/overlay/overlay-directives.ts

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ let defaultPositionList = [
2424
];
2525

2626

27+
/**
28+
* Directive applied to an element to make it usable as an origin for an Overlay using a
29+
* ConnectedPositionStrategy.
30+
*/
31+
@Directive({
32+
selector: '[overlay-origin]',
33+
exportAs: 'overlayOrigin',
34+
})
35+
export class OverlayOrigin {
36+
constructor(private _elementRef: ElementRef) { }
37+
38+
get elementRef() {
39+
return this._elementRef;
40+
}
41+
}
42+
43+
44+
2745
/**
2846
* Directive to facilitate declarative creation of an Overlay using a ConnectedPositionStrategy.
2947
*/
@@ -86,21 +104,4 @@ export class ConnectedOverlayDirective implements OnInit, OnDestroy {
86104
}
87105

88106

89-
/**
90-
* Directive applied to an element to make it usable as an origin for an Overlay using a
91-
* ConnectedPositionStrategy.
92-
*/
93-
@Directive({
94-
selector: '[overlay-origin]',
95-
exportAs: 'overlayOrigin',
96-
})
97-
export class OverlayOrigin {
98-
constructor(private _elementRef: ElementRef) { }
99-
100-
get elementRef() {
101-
return this._elementRef;
102-
}
103-
}
104-
105-
106107
export const OVERLAY_DIRECTIVES = [ConnectedOverlayDirective, OverlayOrigin];

0 commit comments

Comments
 (0)