I use Dexie to store data on the brozwser using HTML and javascript,
I have no problem when I store data but I have an issue when I get data to IndexedDb
this my code to get data
var db = new Dexie('database_name');
function get_content(id) {
id = parseInt(id);
var content = db.downloads.get(id);
return content;
}
console.log(get_content(3))
And I get this error
Cannot read properties of undefined (reading 'get') when getting data
I save the data in the browser using the db.downloads.add() method. ".downloads" is the name of the table
Why do I get this error?