When using the debugger and re-using an argument name in a chain of promises, the debugger displays the second argument as undefined()
.
Try running the examples in Firefox and compare what the debugger displays about the argument to the second callback.