-
-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Multiple Image Blob Export #2094
Conversation
Thank you a lot for this effort! Still there are 2 existing tests that are failing in the edge-cases test:
Looking at the code in tson.ts, I think it looks like the missing part is not to uncomment Could you try this? Otherwise I'll see if I could get some time in the weekend to try it. |
Thanks so much for your prompt response! Curious that the tests fail, I have them passing consistently on my local machine running Never mind, I have made the change you suggested, which indeed makes far more sense than commenting the line out - tested this again with my sample project and have confirmed the bug still fixed. Thanks! |
Thanks, it did the trick! Now one test on dexie is failing but that's a bit strange since this code doesn't change anything there. It's probably something else, I'll try to investigate it. To run the tests for this addon locally, you need to:
|
Yes, I verified that the failing test is a new unit test (4 weeks old) that has some timing dependencies and can fail depending on the speed of the hardware. I will merge this PR now and deal with the failing test in another PR. |
Wonderful - thanks so much for your help! ✨ |
Thank you too 👍 It's released on npm now. |
Hello there, I'm the developer of noto.ooo and have been enjoying using Dexie and dexie-export-import as part of this project!
I've re-discovered a bug that I believe surfaced in this pull request.
With hopes of fixing this for my own project and to give a little back to this fantastic library I've done my best to put together the following pull request.
Case: When storing multiple Blobs with Dexie, exporting the database with dexie-export-import, then importing that exported database.
Expected Behaviour: I see each of my images displayed.
Actual Behaviour: I see the first of my many images repeated for as many images as there are.
Reproduction of this Bug
I noticed this issue with a new feature I'm developing where images are stored and exported/imported with Dexie and dexie-export-import.
In order to make the issue clearly demonstrable I've put together a sample project:
Reproduction Steps with Sample Project
Fix Approach
As I mentioned, I searched for an existing issue for this and found this existing and closed issue. I was curious if this fix worked so pasted it directly into my project's (noto)
node_modules/dexie-export-import/dist/dexie-export-import.mjs
. Where I had been exporting and importing a large amount of images and being perplexed as to why the same image was repeated for every single one, after applying this patch and exporting/importing again I could verify that my images were displaying as I expected.Updating the Test
I noticed the other PR was closed due a test failing so thought I had better try and address that.
Testing
I've tested that this fix solves my outlined problem, exporting the same image over and over.
Test Case Anecdotes
Closing
Thanks for your continued work and passion on this incredibly valuable library - love it! ❤️
Although I'm a touch out of my depth diving into this unknown codebase, I'm motivated to get this issue fixed and have done my best to make a solid pull request to that end.