fix: progress bar not disappearing (#18375)

* fix: progress bar not disappearing

* style: format

[skip ci]

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
stephen 2022-10-12 08:57:49 +02:00 committed by GitHub
parent cfee53d573
commit 729be707cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,16 +42,13 @@ frappe.socketio = {
data.percent = (flt(data.progress[0]) / data.progress[1]) * 100;
}
if (data.percent) {
if (data.percent == 100) {
frappe.hide_progress();
} else {
frappe.show_progress(
data.title || __("Progress"),
data.percent,
100,
data.description
);
}
frappe.show_progress(
data.title || __("Progress"),
data.percent,
100,
data.description,
true
);
}
});