Skip to content

Commit 281d236

Browse files
committed
Invoke promise method to return a deferred object's promise
1 parent 0543522 commit 281d236

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec/_static/javascripts/version_dropdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ 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);
6465
p.fail(onFail).always(onAlways);
6566

66-
await p.then(onVersions);
67+
await p.promise();
6768

6869
/**
6970
* Callback invoked upon resolving a JSON resource.

0 commit comments

Comments
 (0)