Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking instanceof Arrays cross frames (needed for the vjs.Player.prototype.src method) #1218

Closed
wants to merge 7 commits into from
Prev Previous commit
Next Next commit
Checking instanceof Arrays cross frames. fix #1195
Using the instanceof Array method will not work for arrays created on another frame,
Instead of instanceof we should use Array.isArray, but this is not supported on IE8.
So vjs.obj.isArray shim was created for the isArray method.
shmulik committed May 20, 2014
commit f930032a1a2d919d18ca74d875e04f00759e2a2c
2 changes: 1 addition & 1 deletion src/js/component.js
Original file line number Diff line number Diff line change
@@ -471,7 +471,7 @@ vjs.Component.prototype.initChildren = function(){

if (children) {
// Allow for an array of children details to passed in the options
if (children instanceof Array) {
if (vjs.obj.isArray(children)) {
for (var i = 0; i < children.length; i++) {
child = children[i];