minor changes

This commit is contained in:
rolux 2012-06-23 20:23:19 +02:00
parent ab11f85f26
commit 6fcac07ee9

View file

@ -18,11 +18,9 @@ Ox.GarbageCollection = (function() {
function collect() {
var len = Ox.len(Ox.UI.elements);
Object.keys(Ox.UI.elements).forEach(function(id) {
if (
Ox.UI.elements[id]
&& Ox.isUndefined(Ox.UI.elements[id].$element.data('oxid'))
) {
Ox.UI.elements[id].remove();
var $element = Ox.UI.elements[id]
if ($element && Ox.isUndefined($element.$element.data('oxid'))) {
$element.remove();
delete Ox.UI.elements[id];
}
});