Update src/content.ts

Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
Joe Dowd
2020-09-04 11:56:07 +01:00
committed by GitHub
parent b6206fabbc
commit d8a48ed9bc

View File

@@ -634,9 +634,7 @@ function sponsorsLookup(id: string) {
if (response?.ok) {
let getResult = JSON.parse(response.responseText);
if (Config.config.hashPrefix) {
getResult = getResult.filter((video) => {
return video.videoID = id;
});
getResult = getResult.filter((video) => video.videoID === id);
if (getResult.length > 0) {
getResult = getResult[0].segments;
if (getResult.length === 0) { // return if no segments found