mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 09:49:57 +08:00
9 lines
183 B
TypeScript
9 lines
183 B
TypeScript
export function validProgress(progress: number | undefined) {
|
|
if (!progress || progress < 0) {
|
|
return 0;
|
|
} else if (progress > 100) {
|
|
return 100;
|
|
}
|
|
return progress;
|
|
}
|