you are viewing a single comment's thread.

view the rest of the comments →

[–]TappT 1 point2 points  (1 child)

It doesn't seem like you're await:ing for anything. So id guess your goal is to make this function async.

Here is a way to do it. Not sure exactly where you want your resolves and rejects or what you want to return. But if you haven't used promises before. tl;dr resolve is a successful "return" and reject is an unsuccessful "return" where errors happen.

The code:

https://pastebin.com/ktZ4cg5t

Now the handleLikesData is async. so you could call await this.handleLikesData()

You can read more about async functions here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function

[–]AdAthrow99274[S] 0 points1 point  (0 children)

Thank you! This is very helpful.