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() { function collect() {
var len = Ox.len(Ox.UI.elements); var len = Ox.len(Ox.UI.elements);
Object.keys(Ox.UI.elements).forEach(function(id) { Object.keys(Ox.UI.elements).forEach(function(id) {
if ( var $element = Ox.UI.elements[id]
Ox.UI.elements[id] if ($element && Ox.isUndefined($element.$element.data('oxid'))) {
&& Ox.isUndefined(Ox.UI.elements[id].$element.data('oxid')) $element.remove();
) {
Ox.UI.elements[id].remove();
delete Ox.UI.elements[id]; delete Ox.UI.elements[id];
} }
}); });