delete asset fullfilled, filter Object by key

PHOTO EMBED

Wed Sep 28 2022 11:02:02 GMT+0000 (UTC)

Saved by @Marou03 #typescript

   // Delete one Asset
            .addCase(deleteAssetThunk.fulfilled, (state, action) => {
                state.assets = Object.fromEntries(Object.entries(state.assets).filter(([key]) => key !== action.payload))
                console.log('fulfilled, asset Deleted');
            })
content_copyCOPY