mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Apply suggestions from code review
Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
@@ -5,16 +5,16 @@
|
|||||||
<overview>
|
<overview>
|
||||||
<p>
|
<p>
|
||||||
In JavaScript, <code>async</code> functions always return a promise object.
|
In JavaScript, <code>async</code> functions always return a promise object.
|
||||||
To obtain the underlying value of the promise, the <code>await</code. operator or a call to <code>then</code. should be used.
|
To obtain the underlying value of the promise, the <code>await</code> operator or a call to <code>then</code> should be used.
|
||||||
Attempting to use a Promise object instead of its underlying value can lead to expected behavior.
|
Attempting to use a Promise object instead of its underlying value can lead to unexpected behavior.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</overview>
|
</overview>
|
||||||
<recommendation>
|
<recommendation>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Use the <code>await</code. operator to get the value contained in the promise.
|
Use the <code>await</code> operator to get the value contained in the promise.
|
||||||
Alternatively, call <code>then</code. on the promise and use the value passed to the callback.
|
Alternatively, call <code>then</code> on the promise and use the value passed to the callback.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</recommendation>
|
</recommendation>
|
||||||
|
|||||||
Reference in New Issue
Block a user