Closed DaveLomber closed 4 years ago
Same here :-(
Thanks for the report, I'll take a look
@DaveLomber @Txuso can you give me some example code that triggers the above error?
I tried the following:
import { openDB, DBSchema } from 'idb/with-async-ittr';
interface MyDB extends DBSchema {
'favourite-number': {
key: string;
value: number;
};
products: {
value: {
name: string;
price: number;
productCode: string;
};
key: string;
indexes: { 'by-price': number };
};
}
openDB<MyDB>('foo', 1).then(async db => {
const tx = db.transaction('favourite-number');
for await (const cursor of tx.store) {
console.log(cursor);
}
});
…and it worked without error.
I also tried it without types:
import { openDB } from 'idb/with-async-ittr';
openDB('foo', 1).then(async db => {
const tx = db.transaction('favourite-number');
for await (const cursor of tx.store) {
console.log(cursor);
}
});
…but again, no error. What am I missing?
I can confirm this error with Ionic 4 + Angular
I'm interested in fixing this, but can't without a reproducible test case. Please reopen this when you have one.
I'm unfamiliar with Ionic & Angular, so ideally can you give me a reduced project that only contains what's needed to recreate the issue.
After upgraded from 4.0.4 to 4.0.5 I started getting the following error: