Skip to content

Commit 25c7fd5

Browse files
andrewseguinjelbourn
authored andcommitted
fix(progress-circle): allow value to be set to 0 (#1536)
1 parent d2c288d commit 25c7fd5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib/progress-circle/progress-circle.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ describe('MdProgressCircular', () => {
6666
progressComponent.value = 50;
6767
expect(progressComponent.value).toBe(50);
6868

69+
progressComponent.value = 0;
70+
expect(progressComponent.value).toBe(0);
71+
72+
progressComponent.value = 100;
73+
expect(progressComponent.value).toBe(100);
74+
6975
progressComponent.value = 999;
7076
expect(progressComponent.value).toBe(100);
7177

src/lib/progress-circle/progress-circle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class MdProgressCircle implements OnDestroy {
108108
}
109109
}
110110
set value(v: number) {
111-
if (v && this.mode == 'determinate') {
111+
if (v != null && this.mode == 'determinate') {
112112
let newValue = clamp(v);
113113
this._animateCircle((this.value || 0), newValue, linearEase, DURATION_DETERMINATE, 0);
114114
this._value = newValue;

0 commit comments

Comments
 (0)