If a then
handler has no return
statement, the resulting chained promise takes on the value undefined
in bluebird. But I cannot see anywhere that it is specified in Promises/A+ or anywhere? Can this behavior be counted on?
Here's a test program:
var Promise = require('bluebird');
var p = Promise.resolve('test');
p.then(function(s) {
console.log('s1='+s);
// no return
}).then(function(s) {
// bluebird prints "undefined". is this specified by a standard?
console.log('s2='+s);
});