Skip to content

Commit e21b169

Browse files
committed
Remove duplicate success callback
1 parent 5c124b8 commit e21b169

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

spec/_static/javascripts/version_dropdown.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ async function add_version_dropdown(json_loc, target_loc, text) {
5656
dropdown.appendChild(button);
5757
dropdown.appendChild(content);
5858

59-
await $.getJSON(json_loc, onVersions).done(onDone).fail(onFail).always(onAlways);
59+
await $.getJSON(json_loc).done(onDone).fail(onFail).always(onAlways);
6060

6161
/**
62-
* Callback invoked upon successfully resolving a list of versions.
62+
* Callback invoked upon resolving a JSON resource.
6363
*
6464
* @private
6565
* @param {Object} versions - versions object
6666
*/
67-
async function onVersions(versions) {
67+
async function onDone(versions) {
6868
const currentURL = window.location.href;
6969
let path = currentURL.split(/_site|array_api/)[1];
7070
if (path) {
@@ -83,14 +83,6 @@ async function add_version_dropdown(json_loc, target_loc, text) {
8383
content.appendChild(a);
8484
}
8585
}
86-
}
87-
88-
/**
89-
* Callback invoked upon resolving a JSON resource.
90-
*
91-
* @private
92-
*/
93-
function onDone() {
9486
button.innerHTML = text;
9587
}
9688

0 commit comments

Comments
 (0)