fix: fix filtering of null/undefined attributes

This commit is contained in:
Viren070
2025-09-28 20:03:54 +01:00
parent 820a5e0b06
commit 53139697f9
+7 -7
View File
@@ -125,13 +125,13 @@ export class StremioTransformer {
return stream.parsedFile?.[attribute];
}
})
.filter((attribute) =>
attribute !== undefined &&
attribute !== null &&
Array.isArray(attribute)
? attribute.length
: true
);
.flat()
.filter((attribute) => {
if (attribute === undefined || attribute === null) return false;
if (Array.isArray(attribute)) return attribute.length > 0;
return true;
});
let bingeGroup: string | undefined;
if (autoPlaySettings.enabled) {
bingeGroup = Env.ADDON_ID;