summaryrefslogtreecommitdiff
path: root/public/bundle.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-30 14:38:57 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-30 14:38:57 +0200
commit4361ca701337c22796c8054f8051fc286554c349 (patch)
tree9321c4b327f140bedf5fc4b2640bea1ced08fe9a /public/bundle.js
parentcba34c1ff3fc4fa3e4444884133a9140443bb233 (diff)
fix yt
Diffstat (limited to 'public/bundle.js')
-rw-r--r--public/bundle.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/public/bundle.js b/public/bundle.js
index a5fe85b..0b4a12b 100644
--- a/public/bundle.js
+++ b/public/bundle.js
@@ -535,17 +535,16 @@ var integrations = exports.integrations = [{
var thumb = "https://i.ytimg.com/vi/" + id + "/hqdefault.jpg";
var jsonp_url = new URL('https://www.googleapis.com/youtube/v3/videos');
- if (data) {
- Object.keys({
- id: id,
- key: "AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc",
- part: "id,contentDetails,snippet,status"
- }).forEach(function (key) {
- return jsonp_url.searchParams.append(key, data[key]);
- });
- }
+ var data = {
+ id: id,
+ key: "AIzaSyCaLRGY-hxs92045X-Jew7w1FgQPkStHgc",
+ part: "id,contentDetails,snippet,status"
+ };
+ Object.keys(data).forEach(function (key) {
+ return jsonp_url.searchParams.append(key, data[key]);
+ });
- (0, _fetchJsonp2.default)(jsonp_url).then(function (result) {
+ (0, _fetchJsonp2.default)(jsonp_url.toString()).then(function (result) {
return result.json();
}).then(function (result) {
if (!result || !result.items.length) {