Open quangtruong16994 opened 7 years ago
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} }) );
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?