purging empty drafts

This commit is contained in:
Nouman Tahir 2022-07-21 13:45:52 +05:00
parent ba109a7479
commit a4e5cc372e

View File

@ -170,7 +170,7 @@ const initialState:State = {
if (state.drafts && state.drafts.size) {
Array.from(state.drafts).forEach((entry) => {
if(entry[1].expiresAt < currentTime){
if (entry[1].expiresAt < currentTime || !entry[1].body) {
state.drafts.delete(entry[0]);
}
})