mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
parent
aa69d4df8a
commit
c973c34597
|
@ -67,9 +67,8 @@ function _throttle<T>(fn: Function, key: string): Function {
|
|||
|
||||
this[currentKey] = fn.apply(this, args) as Promise<T>;
|
||||
|
||||
done(this[currentKey]).then(() => {
|
||||
this[currentKey] = undefined;
|
||||
});
|
||||
const clear = () => this[currentKey] = undefined;
|
||||
done(this[currentKey]).then(clear, clear);
|
||||
|
||||
return this[currentKey];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue