phillro/node-elasticsearch-client — pull request #95 by AVVS (2013-06-27 16:24:58+00:00)
Title: alter the way we extract callbacks from the arguments object

basically, due to the nature of the JS, if callback arguments[arguments.length-1] was indeed a function, when we were assigning it to the cb variable, we only assigned a pointer. When changing arguments[arguments.length-1] it was setting callback function equal to false as well, practically denying the possibility of having a callback.