Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Fix var name (#985)

Travis Jeffery5cd2add72dca
diff --git a/support/tail.js b/support/tail.js
index 8afab482..05dd1525 100644
--- a/support/tail.js
+++ b/support/tail.js
@@ -33,9 +33,8 @@ var uncaughtExceptionHandlers = [];
process.removeListener = function(e, fn){
if ('uncaughtException' == e) {
global.onerror = function() {};
-
- var indexOfFn = uncaughtExceptionHandlers.indexOf(fn);
- if (indexOfFn != -1) { uncaughtExceptionHandlers.splice(indexOfFn, 1); }
+ var i = uncaughtExceptionHandlers.indexOf(fn);
+ if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }
}
};