From 07e05a92eb73d2b56f73fb1810d5ce77de5242ed Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 15 Jul 2021 18:24:36 -0400 Subject: [PATCH] pad_editbar: Call the callback after all work is done --- src/static/js/pad_editbar.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/static/js/pad_editbar.js b/src/static/js/pad_editbar.js index f44855f7b..9320fd749 100644 --- a/src/static/js/pad_editbar.js +++ b/src/static/js/pad_editbar.js @@ -225,8 +225,6 @@ exports.padeditbar = { module.removeClass('popup-show'); } } - - if (cb) return cb(); } else { // hide all modules that are not selected and remove highlighting // respectively add highlighting to the corresponding button @@ -239,12 +237,10 @@ exports.padeditbar = { } else if (thisModuleName === moduleName) { $(`li[data-key=${thisModuleName}] > a`).addClass('selected'); module.addClass('popup-show'); - if (cb) { - cb(); - } } } } + if (cb) cb(); }, setSyncStatus: (status) => { if (status === 'syncing') {