Closed newyankeecodeshop closed 10 years ago
The catch is that PromiseButton calls promise.done()
. done()
is a Q feature, not part of the promise standard. If we don't call done()
unhandled exceptions are swallowed.
Yeah, I'm going to add a prop to control that. So if the promise infrastructure is not Q, there's a way out.
if (this.props.terminateChain) {
promise.done();
}
Note that now PromiseButton will work with other types of promises, including ES6 Promises, but also supports terminating promise chains as implemented by Q and WinJS.
PromiseButton should remove the dependency on Q and support any promise implementation that implements
then()
based on the Promises/A+ specification. This would support direct use of PromiseButton with jQuery and other libraries. It would also remove the need to have wingspan-forms depend on Q.