提交 c973c345 编写于 作者: J Joao Moreno

🐛 fix git throttle decorator

fixes #25271
上级 aa69d4df
......@@ -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];
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册