Skip to content

Commit 66ddd3a

Browse files
crisbetojelbourn
authored andcommitted
fix(progress-circle): remove references to window (#838)
* Removes the references to `window` in the progressCircle component. * A couple of minor coding style tweaks. Fixes #837.
1 parent 4bb7790 commit 66ddd3a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ const DURATION_INDETERMINATE = 667;
1616
/** Duration of the indeterminate animation. */
1717
const DURATION_DETERMINATE = 225;
1818
/** Start animation value of the indeterminate animation */
19-
let startIndeterminate = 3;
19+
const startIndeterminate = 3;
2020
/** End animation value of the indeterminate animation */
21-
let endIndeterminate = 80;
21+
const endIndeterminate = 80;
2222

2323

2424
export type ProgressCircleMode = 'determinate' | 'indeterminate';
@@ -184,7 +184,7 @@ export class MdProgressCircle implements OnDestroy {
184184
private _startIndeterminateAnimation() {
185185
let rotationStartPoint = 0;
186186
let start = startIndeterminate;
187-
let end = endIndeterminate;
187+
let end = endIndeterminate;
188188
let duration = DURATION_INDETERMINATE;
189189
let animate = () => {
190190
this._animateCircle(start, end, materialEase, duration, rotationStartPoint);
@@ -250,8 +250,8 @@ function clamp(v: number) {
250250
* Returns the current timestamp either based on the performance global or a date object.
251251
*/
252252
function now() {
253-
if (window.performance && window.performance.now) {
254-
return window.performance.now();
253+
if (typeof performance !== 'undefined' && performance.now) {
254+
return performance.now();
255255
}
256256
return Date.now();
257257
}

0 commit comments

Comments
 (0)