* 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:
parent
271e48eaa9
commit
dff39778a6
2 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue