mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
11 lines
237 B
TypeScript
11 lines
237 B
TypeScript
// eslint-disable-next-line import/prefer-default-export
|
|
export function validProgress(progress: number | undefined) {
|
|
if (!progress || progress < 0) {
|
|
return 0;
|
|
}
|
|
if (progress > 100) {
|
|
return 100;
|
|
}
|
|
return progress;
|
|
}
|