Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Can't add multiple time #54

Open
quangtruong16994 opened this issue Dec 23, 2016 · 1 comment
Open

Can't add multiple time #54

quangtruong16994 opened this issue Dec 23, 2016 · 1 comment

Comments

@quangtruong16994
Copy link

when I add more than 1 time, like:
DB.zamba.add({ id: "account", value: { username: username, password: password, isSaveAccount: true } }); DB.zamba.add({ id: "isSaveAccount", value: { isSave: true } });

It only saves "isSaveAccount". How can I fix this?

@kymar
Copy link

kymar commented Apr 10, 2017

Is this not because they return a promise and are not executed synchronously so you'd need like:

DB.zamba.add({ id: 'account', value: { username: username, password: password, isSaveAccount: true } }).then(() => DB.zamba.add({ id: 'isSaveAccount', value: {isSave: true} }) );

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants