Great Work
Hello,
I am so happy to find your package because it suits perfectly my needs. Thank you for this great work!
Problem
Anyway, I was trying to clear the store before re-downloading images but when doing it, I got an error saying that the images I re-download already exists and then when I try to display the image, I got an error: Could not find image: file://blablabla....
Observation
Looking through the code, I noticed that here:
this. entries = {}
isn't doing anything (If i log
this.entries
on the line after, it is not empty)
Then, I noticed that the instance
was frozen before being export:
As a result, it is not possible to reassign property like this.entries = {}
When I comment this line, it works fine.
Solution
I identified two solutions,
The first and easiest solution would be to remove the line L368 (the freeze of the instance) but I am not sure why it is done like that and I'm not aware of side effects
The second solution would be to rework clearStore function. Iterating on this.entries
and deleting each keys one by one:
delete this.entries[blabla]
Conclusion
I would be happy to develop the fix because I'd like to use it quickly in my project.
Let me know which solution you like the most.
Waiting for your answer, I will be implementing the second one.
Have a nice day!
Robin