aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2021-01-31 12:03:54 -0500
committerAjay Ramachandran <[email protected]>2021-01-31 12:03:54 -0500
commit44571a67d9eada435a06ed6d11427f8b27df2a29 (patch)
treed5d210d77be4355ac4abef8520d4cb8a30b03198
parent83955fc74632dc258b6f98a115e429cb3153c2b7 (diff)
downloadSponsorBlock-44571a67d9eada435a06ed6d11427f8b27df2a29.tar.gz
SponsorBlock-44571a67d9eada435a06ed6d11427f8b27df2a29.zip
Fix segments being deleted
-rw-r--r--src/config.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.ts b/src/config.ts
index 5723db12..c7f9819f 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -250,7 +250,7 @@ const Config: SBObject = {
function encodeStoredItem<T>(data: T): T | UnencodedSegmentTimes {
// if data is SBMap convert to json for storing
if(!(data instanceof SBMap)) return data;
- return Array.from(data.entries()).filter((element) => element[1] === []); // Remove empty entries
+ return Array.from(data.entries()).filter((element) => element[1].length > 0); // Remove empty entries
}
/**