1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-14 11:23:30 +02:00

Fixed problem with removing component

Component.id and Component.name are functions
we should either call the functions or pass component.id_ and component.name_
This commit is contained in:
Carlos 2015-01-20 15:22:24 +00:00 committed by heff
parent e8235c9022
commit 0f4b19b94c

View File

@ -435,8 +435,8 @@ vjs.Component.prototype.removeChild = function(component){
if (!childFound) return; if (!childFound) return;
this.childIndex_[component.id] = null; this.childIndex_[component.id()] = null;
this.childNameIndex_[component.name] = null; this.childNameIndex_[component.name()] = null;
var compEl = component.el(); var compEl = component.el();
if (compEl && compEl.parentNode === this.contentEl()) { if (compEl && compEl.parentNode === this.contentEl()) {