From 3f35642010dbaa105b3b162fae11d33eed83eec9 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Mon, 26 Aug 2019 14:35:49 -0400 Subject: [PATCH] Made the preview bar wait for it to not be null. --- content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content.js b/content.js index 1af670f4..d6a8bf2c 100644 --- a/content.js +++ b/content.js @@ -414,7 +414,7 @@ function updatePreviewBar() { types.push("previewSponsor"); } - previewBar.set(allSponsorTimes, types, v.duration); + wait(() => previewBar !== null).then((result) => previewBar.set(allSponsorTimes, types, v.duration)); //update last video id lastPreviewBarUpdate = sponsorVideoID;