mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: don't crash if taskbar.tasklist is not defined yet
This commit is contained in:
@@ -112,6 +112,10 @@ define('taskbar', ['benchpress', 'translator', 'hooks'], function (Benchpress, t
|
||||
};
|
||||
|
||||
taskbar.updateActive = function (uuid) {
|
||||
if (!taskbar.tasklist) {
|
||||
return;
|
||||
}
|
||||
|
||||
const tasks = taskbar.tasklist.find('li');
|
||||
tasks.removeClass('active');
|
||||
tasks.filter('[data-uuid="' + uuid + '"]').addClass('active');
|
||||
|
||||
Reference in New Issue
Block a user