Skip to content

Commit

Permalink
shipper: templates: build_upload: use let when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed May 31, 2021
1 parent 5e38b77 commit c170e0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shipper/templates/shipper/build_upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ <h3>{{ device }} - Upload new build</h3>
contentType: false,
processData: false,
xhr: function () {
var myXhr = $.ajaxSettings.xhr();
var bar = $('.progress-bar');
let myXhr = $.ajaxSettings.xhr();
let bar = $('.progress-bar');
if (myXhr.upload) {
myXhr.upload.addEventListener('progress', function (e) {
if (e.lengthComputable) {
var percentVal = e.loaded * 100 / e.total;
let percentVal = e.loaded * 100 / e.total;
bar.width(percentVal + '%');
bar.attr("aria-valuenow", percentVal | 0);
bar.text(parseInt(percentVal, 10) + "%");
Expand Down

0 comments on commit c170e0c

Please sign in to comment.