ant-design/components/progress/utils.ts

9 lines
183 B
TypeScript
Raw Normal View History

export function validProgress(progress: number | undefined) {
if (!progress || progress < 0) {
return 0;
} else if (progress > 100) {
return 100;
}
return progress;
2019-03-06 13:45:40 +08:00
}