Please answer the questions the best you can:
- What version of bluebird is the issue happening on?
3.4.3
- What platform and version? (For example Node.js 0.12 or Google Chrome 32)
Node.js v6.4.0
- Did this issue happen with earlier version of bluebird?
No; this only happens since v3.4.2.
Reproduction code:
var Promise = require('bluebird');
var myObject = {
then: function() { console.log('.then was called'); }
};
var promiseForMyObject = Promise.delay(5000).then(function() {
// myObject happens to have a .then function, but we don't actually want it to be treated as a thenable.
// As a workaround, just get rid of the .then function.
myObject.then = undefined;
}).return(myObject)
.then(function() {
console.log('promiseForMyObject fulfilled');
});
Output in <= v3.4.1:
(after 5 seconds): promiseForMyObject fulfilled
Output in v3.4.2 and v3.4.3:
(immediately): .then was called
3.4.3
Node.js v6.4.0
No; this only happens since v3.4.2.
Reproduction code:
Output in <= v3.4.1:
Output in v3.4.2 and v3.4.3: