Skip to content
Snippets Groups Projects
Commit bb23e98b authored by Jose Manuel Serrano Amaut's avatar Jose Manuel Serrano Amaut
Browse files

[FIX]: Add conditional to change progress only when progress is diferent

parent 5c39492c
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,10 @@ const useProgress = (
const [localProgress, setLocalProgress] = React.useState<number | undefined>(undefined);
if (progress !== undefined) {
setLocalProgress(progress);
if (localProgress !== progress) {
setLocalProgress(progress);
}
} else {
if (xhr !== undefined && xhr !== null && xhr.upload.onprogress === null) {
// xhr was given but it was not initialized the `onprogress` event
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment