question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Promise reference in core?

See original GitHub issue

Take a look at this line currently in master: https://github.com/hyperapp/hyperapp/blob/ffe9209cd2a5ce9927c0dfb55830c4577459d2c4/src/index.js#L65

What’s the purpose of && !result.then?

Does Hyperapp really care if the result is a Promise?

All the tests still pass with this removed, including one that actually returns a Promise: https://github.com/hyperapp/hyperapp/blob/ffe9209cd2a5ce9927c0dfb55830c4577459d2c4/test/actions.test.js#L75-L100

What am I missing? 🤔

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
Swizzcommented, Nov 9, 2017

Allowing user to reuse Promise resolving to await async actions in sequence is really helpful.

0reactions
jorgebucarancommented, Nov 9, 2017

I am going to close here because the question has been answered, if there’s another question or proposal that you would like to make, please create a new issue! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise - JavaScript - MDN Web Docs
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
Read more >
core-promise - npm
A promise implementation that is fully conformant to the Promises/A+ spec, passing all the 872 tests from the reference tests, and most of...
Read more >
The Core of Promises in JavaScript | by Belle Poopongpanit
A common JavaScript concept that we find interviewers asking about are promises. “Explain what a promise is” or “show me how promises work....
Read more >
JavaScript Promise with Examples - Dot Net Tutorials
In this article, I am going to discuss the JavaScript Promise with Examples. JavaScript promise is same as a promise we make in...
Read more >
Promise.resolve is not bound to Promise object #127 - GitHub
Binding constructor will break subclassing. I think It's not really true. It's just Promise constructor functions that behave that way, e.g. you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found