Commit bc6080e5 authored by analog-nico's avatar analog-nico
Browse files

Quick fix for issue #36

parent 1067cbb3
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
'use strict';
'use strict';


var Bluebird = require('./bluebird-fresh.js'),
var Bluebird = require('./bluebird-fresh.js'),
    printRejectionReason = require('./bluebird-captured-trace-fresh.js').formatAndLogError,
    CapturedTrace = require('./bluebird-captured-trace-fresh.js'),
    _ = require('lodash'),
    _ = require('lodash'),
    chalk = require('chalk');
    chalk = require('chalk');


@@ -152,6 +152,8 @@ request.Request.prototype.promise = function RP$promise() {
};
};




var printRejectionReason = CapturedTrace.formatAndLogError || CapturedTrace.possiblyUnhandledRejection;

Bluebird.onPossiblyUnhandledRejection(function (reason, promise) {
Bluebird.onPossiblyUnhandledRejection(function (reason, promise) {
    // For whatever reason we don't see _rp_in_use here at all after then is called. --> We compare to false instead of true.
    // For whatever reason we don't see _rp_in_use here at all after then is called. --> We compare to false instead of true.
    if (promise._rp_in_use !== false) {
    if (promise._rp_in_use !== false) {