nedb
nedb copied to clipboard
Callback in Electron Render thread not called until reload
Trying to build an app in electron using NEDB.
I have this odd situation where a callback isn't called until you trigger a 'force reload' in the electron window.
Steps In the render thread before I launch Vue I run the following code.
var Datastore = require('nedb')
var db = new Datastore({ filename: 'theDatastore/callings.db' });
db.loadDatabase(function (err) { // Callback is optional
db.count({}, (err,docs) => {
console.log(err)
console.log(docs)
})
});
The code that executes right after the electron app comes up does not execute the callback. If in the electron window I use the force reload menu the code exectues.
Any thoughts? I am new to nodejs and now sure how to see if their is some deep exception I'm missing.
@huntsfromshadow Which Electron version do you use? I experienced the same issue with 6.0.0-beta.15