I've run into an odd issue using 0.6.0-rc2 where the transaction becomes inactive before nodeStore.add, do you have any ideas on why this might happen or how to avoid it? This implementation seems like a valid approach, but I might be missing something fundamental here.
let tx = this.db.transaction(['nodes', 'assignments'], 'write');
let assignmentStore = tx.store('assignments');
let nodeStore = tx.store('nodes');
let assignment = {
title: "Untitled (" + RandomName.get() + ")",
description: "Created " + new Date().toDateString()
};
// Populate the localId while we're here
assignment.localId = await assignmentStore.add(assignment);
let node = {
localAssignmentId: assignment.localId,
tabId: payload.tabId,
title: payload.tabObj.title,
url: payload.tabObj.url
};
node.localId = await nodeStore.add(node);
tx.then(() => { ...
I've run into an odd issue using
0.6.0-rc2where the transaction becomes inactive beforenodeStore.add, do you have any ideas on why this might happen or how to avoid it? This implementation seems like a valid approach, but I might be missing something fundamental here.