* Added check if remove() method exists in a prototype's constructor

* Fixed bug that caused exception when calling Layout.reset() due to undefined main skin of a third-party prototype (e.g. Feed)
This commit is contained in:
Tobi Schäfer 2008-04-27 10:54:07 +00:00
parent 271e48eaa9
commit dff39778a6
2 changed files with 11 additions and 3 deletions

View file

@ -115,7 +115,9 @@ HopObject.remove = function(collection) {
var item;
while (collection.size() > 0) {
item = collection.get(0);
item.constructor.remove.call(item, item);
if (item.constructor.remove) {
item.constructor.remove.call(item, item);
}
}
return;
}