From f80fd0d530b8a42a20e12add34548472f484c48b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 30 Aug 2021 10:39:52 +0200 Subject: [PATCH] no need for document.head fallback --- src/loadSdk.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/loadSdk.js b/src/loadSdk.js index 1979e47..94ca83c 100644 --- a/src/loadSdk.js +++ b/src/loadSdk.js @@ -22,8 +22,7 @@ function loadSdk() { reject(new Error('Could not load YouTube SDK')); }; - const node = document.head || document.getElementsByTagName('head')[0]; - node.appendChild(script); + document.head.appendChild(script); }); }