Skip to content

Commit

Permalink
fix(progress-circle): allow value to be set to 0 (#1536)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewseguin authored and jelbourn committed Oct 19, 2016
1 parent d2c288d commit 25c7fd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/lib/progress-circle/progress-circle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ describe('MdProgressCircular', () => {
progressComponent.value = 50;
expect(progressComponent.value).toBe(50);

progressComponent.value = 0;
expect(progressComponent.value).toBe(0);

progressComponent.value = 100;
expect(progressComponent.value).toBe(100);

progressComponent.value = 999;
expect(progressComponent.value).toBe(100);

Expand Down
2 changes: 1 addition & 1 deletion src/lib/progress-circle/progress-circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class MdProgressCircle implements OnDestroy {
}
}
set value(v: number) {
if (v && this.mode == 'determinate') {
if (v != null && this.mode == 'determinate') {
let newValue = clamp(v);
this._animateCircle((this.value || 0), newValue, linearEase, DURATION_DETERMINATE, 0);
this._value = newValue;
Expand Down

0 comments on commit 25c7fd5

Please sign in to comment.