Skip to content

Commit a63a2cf

Browse files
Fix packet signing race condition (#33)
1 parent e48c00a commit a63a2cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packet/static/js/signing.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ $(document).ready(function () {
33
$('.sign-button').click(function () {
44
var packetData = $(this).get(0).dataset;
55
var userData = $("#userInfo").val();
6-
console.log(userData);
76
swal({
87
title: "Are you sure?",
98
text: "Once a packet is signed it can only be unsigned from request to the Evals Director",
@@ -19,10 +18,12 @@ $(document).ready(function () {
1918
success: function (data) {
2019
swal("Congratulations or I'm Sorry\nYou've signed " + packetData.freshman_name + "'s packet", {
2120
icon: "success",
22-
});
21+
})
22+
.then(() => {
23+
location.reload();
24+
});
2325
}
2426
});
25-
location.reload();
2627
}
2728
});
2829
});

0 commit comments

Comments
 (0)