Merge pull request #13 from ceo/patch-1

Fix async await syntax
This commit is contained in:
Randy8080 authored and GitHub committed 2020-12-30 09:28:18 +08:00
commit b7a94d1f27
1 file changed
+1 -1
+1 -1
View File
@@ -1446,7 +1446,7 @@ const getSuggestions = async () => {
const wordQuery = inputField.value;
const endpoint = `${url}${queryParams}${wordQuery}`;
try{
const response = __~await~__ __~fetch(endpoint, {cache: 'no-cache'});
const response = await fetch(endpoint, {cache: 'no-cache'});
if(response.ok){
const jsonResponse = await response.json()
}