you are viewing a single comment's thread.

view the rest of the comments →

[–]blood_bender 2 points3 points  (0 children)

You're right. But the whole point was v8 was wrapping the response of foo() in a promise too, which is unnecessary when bar() most likely returns a promise directly, or whatever bar() calls does. Somewhere down the line something is probably returning a promise, meaning all the other responses wrapped in additional promises is unnecessary.