Skip to content

Commit ba22705

Browse files
author
Mark Robinson
committed
Touch RO bundle URL regardless of whether it is generated
1 parent b91b744 commit ba22705

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/resources/static/js/workflow.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,16 @@ require(['jquery'],
198198
type: 'HEAD',
199199
url: $('#download').attr('href'),
200200
dataType: "json",
201-
success: function (data) {
201+
success: function () {
202+
// Hide generating, show link
202203
$("#generating").addClass("hide");
203204
$("#generated").removeClass("hide");
204205
},
205206
error: function () {
207+
// Show generating, hide link
208+
$("#generated").addClass("hide");
209+
$("#generating").removeClass("hide");
210+
206211
// Retry in 5 seconds if still not generated
207212
setTimeout(function () {
208213
getDownloadLink();
@@ -211,9 +216,5 @@ require(['jquery'],
211216
});
212217
}
213218

214-
// If ajaxRequired exists on the page the RO bundle link is not generated
215-
// at time of page load
216-
if ($("#ajaxRequired").length) {
217-
getDownloadLink();
218-
}
219+
getDownloadLink();
219220
});

0 commit comments

Comments
 (0)