mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
lint: Fix some ESLint errors in pluginfw
This commit is contained in:
parent
a45e85a730
commit
a8479e4a0e
2 changed files with 4 additions and 7 deletions
|
@ -21,15 +21,15 @@ const onAllTasksFinished = () => {
|
|||
|
||||
let tasks = 0;
|
||||
|
||||
function wrapTaskCb(cb) {
|
||||
const wrapTaskCb = (cb) => {
|
||||
tasks++;
|
||||
|
||||
return function (...args) {
|
||||
cb && cb.apply(this, args);
|
||||
return (...args) => {
|
||||
cb && cb(...args);
|
||||
tasks--;
|
||||
if (tasks === 0) onAllTasksFinished();
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
exports.uninstall = async (pluginName, cb = null) => {
|
||||
cb = wrapTaskCb(cb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue