Skip to content

Commit 0543522

Browse files
committed
Rearrange callback assignments
1 parent 02e31b4 commit 0543522

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/_static/javascripts/version_dropdown.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ async function add_version_dropdown(json_loc, target_loc, text) {
6161
const p = $.getJSON(json_loc);
6262
console.log(p);
6363

64-
p.then(onVersions).fail(onFail).always(onAlways);
65-
await p;
64+
p.fail(onFail).always(onAlways);
65+
66+
await p.then(onVersions);
6667

6768
/**
6869
* Callback invoked upon resolving a JSON resource.
@@ -119,7 +120,6 @@ async function add_version_dropdown(json_loc, target_loc, text) {
119120
* @private
120121
*/
121122
function onFail() {
122-
console.log("Failure");
123123
button.innerHTML = "Other Versions Not Found";
124124
}
125125

0 commit comments

Comments
 (0)