debugger: remove unneeded callback check
authorRich Trott <rtrott@gmail.com>
Fri, 19 Feb 2016 07:12:51 +0000 (23:12 -0800)
committerMyles Borins <mborins@us.ibm.com>
Mon, 21 Mar 2016 19:57:57 +0000 (12:57 -0700)
In `lib/_debugger.js`, remove check for `cb` in line 571 as it is
guaranteed to be truthy due to line 521.

PR-URL: https://github.com/nodejs/node/pull/5319
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
lib/_debugger.js

index bd655ff..5ce1b16 100644 (file)
@@ -567,7 +567,7 @@ Client.prototype.mirrorObject = function(handle, depth, cb) {
 
       waitForOthers();
       function waitForOthers() {
-        if (--waiting === 0 && cb) {
+        if (--waiting === 0) {
           keyValues.forEach(function(kv) {
             mirror[kv.name] = kv.value;
           });