Open princefishthrower opened 3 years ago
Never seen this or heard of any similar issue. A repro would be very good if possible.
@princefishthrower If you do console.log(db)
before any of that code, is your database null
? I wonder if it's not initializing properly.
Which version use? I have do this (https://jsfiddle.net/DevShoesed/gp9y1usr/1/) an example and first and second call are the same.
Experiencing this as well. Any pointers on why that could be the case? Does the state needs to be flushed to disk?
Please give us a repro. As @DevShoesed posted, https://jsfiddle.net/DevShoesed/gp9y1usr/1/ gives the same results in both first and second. Also: Dexie version and which browser would be important information.
I've got a very strange issue here: the following Dexie code:
will output the following:
Obviously I expect the second output in both console.logs(), but somehow the first call always returns an empty array!
The code in my application is exactly as above; the two
toArray()
calls are right next to each other. It's almost like there is an init or registering step that takes place by calling the firsttoArray()
. Has anyone seen behaviour like this and have any pointers?