From 9105a2e035f64d7910643e57fb77c1e03c46a985 Mon Sep 17 00:00:00 2001 From: Michael Stramel Date: Tue, 10 Jan 2017 11:26:12 -0600 Subject: [PATCH] Add check to ensure `hasAttribute` is a function For elements which parent doesn't have `hasAttribute` it needs do another check to prevent erroring out. --- src/js/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/player.js b/src/js/player.js index 1f6ad43ec4..5ee21ff495 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -473,7 +473,7 @@ class Player extends Component { createEl() { const tag = this.tag; let el; - const playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute('data-vjs-player'); + const playerElIngest = this.playerElIngest_ = tag.parentNode && tag.parentNode.hasAttribute && tag.parentNode.hasAttribute('data-vjs-player'); if (playerElIngest) { el = this.el_ = tag.parentNode;