Open gr2m opened 9 years ago
@gr2m think it's todo with the stateless constructor but yeah I ran into the same thing.
Okay, so a way around this would be to re-initialize the db
instance on destroy. In the hoodie API, we don't have the option to manually re-initialize the hoodie.store
API, so it must happen auto-magically :tm:
No idea how though
Is there a an alternative to db.destroy
without performance issues in PouchDB?
We have:
Unless we can implement purge I'd think we'd have to re instantiate the database ourselves.
Okay, we throw an error in PouchDB now, so this will mean this test wont hang any more.
could you check locally? Is the new PouchDB version out yet?
No, it's not released yet. But 5.3.0 should have the fix.
follow up for https://github.com/hoodiehq/pouchdb-hoodie-api/pull/75#issuecomment-139851044
Just checked it locally and could reproduce it with PouchDB@4.0.2, but not with 4.0.1. @nickcolley are you looking into this already? It must have be something with the
db.destroy()
call here: https://github.com/hoodiehq/pouchdb-hoodie-api/blob/master/clear.js#L11