mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Remove empty unsubmitted segments
Resolves https://github.com/ajayyy/SponsorBlock/issues/609
This commit is contained in:
parent
e32a251ef3
commit
7307340afa
1 changed files with 2 additions and 2 deletions
|
@ -247,10 +247,10 @@ const Config: SBObject = {
|
|||
*
|
||||
* @param data
|
||||
*/
|
||||
function encodeStoredItem<T>(data: T): T | Array<any> {
|
||||
function encodeStoredItem<T>(data: T): T | Array<[string, Array<SponsorTime>]> {
|
||||
// if data is SBMap convert to json for storing
|
||||
if(!(data instanceof SBMap)) return data;
|
||||
return Array.from(data.entries());
|
||||
return Array.from(data.entries()).filter((element) => element[1] === []); // Remove empty entries
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue