diff --git a/projects/plugins/protect/changelog/fix-protect-progress-bar-decimals b/projects/plugins/protect/changelog/fix-protect-progress-bar-decimals new file mode 100644 index 000000000000..b3b32d6868bd --- /dev/null +++ b/projects/plugins/protect/changelog/fix-protect-progress-bar-decimals @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Round percentage values in progress bar component diff --git a/projects/plugins/protect/src/js/components/progress-bar/index.jsx b/projects/plugins/protect/src/js/components/progress-bar/index.jsx index a2a5c11a849b..c01ab4e33aca 100644 --- a/projects/plugins/protect/src/js/components/progress-bar/index.jsx +++ b/projects/plugins/protect/src/js/components/progress-bar/index.jsx @@ -16,7 +16,7 @@ const ProgressBar = ( { className, total = 100, value } ) => { } // The percentage should not be allowed to be more than 100 - const progress = Math.min( ( value / total ) * 100, 100 ); + const progress = Math.min( Math.round( ( value / total ) * 100 ), 100 ); const style = { width: `${ progress }%`,