mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #8151, don't crash if taskbar doesn't have element
This commit is contained in:
@@ -200,6 +200,9 @@ define('taskbar', ['benchpress', 'translator'], function (Benchpress, translator
|
||||
|
||||
taskbar.update = function (module, uuid, options) {
|
||||
var element = taskbar.tasklist.find('[data-module="' + module + '"][data-uuid="' + uuid + '"]');
|
||||
if (!element.length) {
|
||||
return;
|
||||
}
|
||||
var data = element.data();
|
||||
|
||||
Object.keys(options).forEach(function (key) {
|
||||
|
||||
Reference in New Issue
Block a user