diff --git a/README.md b/README.md index 6ceacdb..874c62c 100644 --- a/README.md +++ b/README.md @@ -57,4 +57,4 @@ Have a version of NODE(=>12) installed. end ## ISSUES: - Transactions/Rollback doesnt work as intended, it overwrites the original hashmap on every call. + Transactions/Rollback doesn't work as intended. Only one instance of transaction can be ran at a time diff --git a/in-mem.js b/in-mem.js index e795772..108e6fd 100644 --- a/in-mem.js +++ b/in-mem.js @@ -53,7 +53,7 @@ class Database { // Rollback the transaction rollback() { - if (transactionMap.values()) { + if (transactionMap.size) { transactionMap.clear(); } else { console.log("Nothing to Rollback");