mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Fix a bug in the component loader that caused components to be loaded multiple times
refs # 4456
This commit is contained in:
parent
61fad6b89c
commit
889abf55eb
@ -81,17 +81,23 @@ define(['jquery', 'logging', 'icinga/componentRegistry'], function ($, log, regi
|
|||||||
.each(function(index, el) {
|
.each(function(index, el) {
|
||||||
var type = $(el).attr('data-icinga-component');
|
var type = $(el).attr('data-icinga-component');
|
||||||
pendingFns++;
|
pendingFns++;
|
||||||
loadComponent(
|
|
||||||
type,
|
if (!el.id || !registry.getById(el.id)) {
|
||||||
el,
|
loadComponent(
|
||||||
function(cmp) {
|
type,
|
||||||
var id = registry.add(cmp, el.id, type);
|
el,
|
||||||
registry.markActive(id);
|
function(cmp) {
|
||||||
el.id = id;
|
var id = registry.add(cmp, el.id, type);
|
||||||
finalize();
|
registry.markActive(id);
|
||||||
},
|
el.id = id;
|
||||||
finalize
|
finalize();
|
||||||
);
|
},
|
||||||
|
finalize
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
registry.markActive(el.id);
|
||||||
|
finalize();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
finalize();
|
finalize();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user