Apply prefer-const lint rule

This commit is contained in:
Zaid Abdulla committed 2018-08-25 16:14:34 -07:00
1 parent b43088c03c
commit 09e6a360af
26 files changed
+217 -215

No files matched your search

+2 -2
View File
@@ -52,7 +52,7 @@ function closeServer(timeout, callback) {
server.removeListener("request", listener);
server.setTimeout(1);
let cb = callback;
const cb = callback;
callback = null;
setTimeout(cb, 1000);
}, timeout).unref();
@@ -60,7 +60,7 @@ function closeServer(timeout, callback) {
server.close(() => {
if (!callback) return;
let cb = callback;
const cb = callback;
callback = null;
cb();
});