-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Use of and assumption of this being the database reference is resulting in inconsistent behavior. Specifically this line
Line 55 in 5020aa5
| var db = this; |
If declaring a database namespace as such:
const db = {
config: new PouchDB('config', { adapter })
}And running the upset method as such:
await db.users.upsert(`${data.userName}-cursor`, (doc) => {
(doc as CursorDoc).cursor = data.nextCursor;
return doc;
});Will result in the db variable being assigned to the global scope and .get being undefined.
Metadata
Metadata
Assignees
Labels
No labels