pad_editbar: Always call the callback

This commit is contained in:
Richard Hansen 2021-07-15 18:57:59 -04:00
parent 07e05a92eb
commit 148e10821b

View file

@ -201,6 +201,8 @@ exports.padeditbar = {
if (padeditor.ace) padeditor.ace.focus();
},
toggleDropDown(moduleName, cb) {
let cbErr = null;
try {
// do nothing if users are sticked
if (moduleName === 'users' && $('#users').hasClass('stickyUsers')) {
return;
@ -240,7 +242,11 @@ exports.padeditbar = {
}
}
}
if (cb) cb();
} catch (err) {
cbErr = err || new Error(err);
} finally {
if (cb) cb(cbErr);
}
},
setSyncStatus: (status) => {
if (status === 'syncing') {