Apply suggestions from code review

Co-Authored-By: Erik Krogh Kristensen <erik-krogh@github.com>
This commit is contained in:
Asger F
2020-01-03 14:15:52 +00:00
committed by GitHub
parent 30a8769dad
commit 3c601fce74

View File

@@ -5,16 +5,16 @@
<overview>
<p>
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.
Attempting to use a Promise object instead of its underlying value can lead to expected behavior.
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 unexpected behavior.
</p>
</overview>
<recommendation>
<p>
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.
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.
</p>
</recommendation>