AndreasMadsen / trace

Creates super long stack traces
https://trace.js.org
MIT License
194 stars 18 forks source link

setTimeout() returns undefined under Node 4 since trace 2.0 #16

Closed julien-f closed 8 years ago

julien-f commented 8 years ago
console.log(setTimeout(function () {}, 0))
//{ _called: false,
//  _idleTimeout: 1,
//  _idlePrev: 
//   Timer {
//     '0': [Function: listOnTimeout],
//     _idleNext: [Circular],
//     _idlePrev: [Circular],
//     msecs: 1 },
//  _idleNext: 
//   Timer {
//     '0': [Function: listOnTimeout],
//     _idleNext: [Circular],
//     _idlePrev: [Circular],
//     msecs: 1 },
//  _idleStart: 195,
//  _onTimeout: [Function: noop],
//  _repeat: null }

require('trace')

console.log(setTimeout(function () {}, 0))
// undefined
AndreasMadsen commented 8 years ago

@julien-f Wow, that is quite embarrassing. Good catch :+1:

I have fixed it now. Hopefully it didn't cause you too much trouble. And thank you so much for reporting this.

julien-f commented 8 years ago

No problem, thank you for this quick fix.