Skip to content

Commit

Permalink
fix: hmset accepts value: 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiced66 committed May 17, 2024
1 parent 425b656 commit d973c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/controllers/memoryStorageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ function initMapping() {
kassert.assertBodyAttributeType(request, "entries", "array");

val.forEach((v) => {
if (typeof v !== "object" || !v.field || !v.value) {
if (typeof v !== "object" || !v.field || (!v.value && v.value !== 0)) {
throw kerror.get(
"invalid_argument",
"entries",
"<array of object>",
"<array of objects>",
);
}

Expand Down

0 comments on commit d973c4f

Please sign in to comment.