Cleanup lint errors

Summary:
Argument was no longer used and is causing lint errors.
Dropping it simplifies the debounce function as well.

Reviewed By: davidaurelio

Differential Revision: D6999567

fbshipit-source-id: 8856ed40feb0fa23155c9d18e20c43550aac876b
This commit is contained in:
Peter van der Zee 2018-02-15 09:42:23 -08:00 committed by Facebook Github Bot
parent 581623ed11
commit 5b383fce16
1 changed files with 6 additions and 11 deletions

View File

@ -52,16 +52,10 @@ const {
} = require('metro-core'); } = require('metro-core');
function debounceAndBatch(fn, delay) { function debounceAndBatch(fn, delay) {
let args = [];
let timeout; let timeout;
return value => { return () => {
args.push(value);
clearTimeout(timeout); clearTimeout(timeout);
timeout = setTimeout(() => { timeout = setTimeout(fn, delay);
const a = args;
args = [];
fn(a);
}, delay);
}; };
} }
@ -183,9 +177,10 @@ class Server {
); );
}); });
this._debouncedFileChangeHandler = debounceAndBatch(filePaths => { this._debouncedFileChangeHandler = debounceAndBatch(
this._informChangeWatchers(); () => this._informChangeWatchers(),
}, 50); 50,
);
this._symbolicateInWorker = symbolicate.createWorker(); this._symbolicateInWorker = symbolicate.createWorker();
this._nextBundleBuildID = 1; this._nextBundleBuildID = 1;