Skip to content

Commit

Permalink
fix: mset accepts value: 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiced66 committed May 17, 2024
1 parent 2d9285d commit d8168a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api/controllers/memoryStorageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function initMapping() {
kassert.assertBodyHasAttribute(request, "entries");
kassert.assertBodyAttributeType(request, "entries", "array");
val.forEach((entry) => {
if (typeof entry !== "object" || !entry.key || !entry.value) {
if (typeof entry !== "object" || !entry.key || (!entry.value && entry.value !== 0)) {

Check failure on line 351 in lib/api/controllers/memoryStorageController.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js LTS 16

Replace `typeof·entry·!==·"object"·||·!entry.key·||·(!entry.value·&&·entry.value·!==·0)` with `⏎··············typeof·entry·!==·"object"·||⏎··············!entry.key·||⏎··············(!entry.value·&&·entry.value·!==·0)⏎············`

Check failure on line 351 in lib/api/controllers/memoryStorageController.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js LTS 18

Replace `typeof·entry·!==·"object"·||·!entry.key·||·(!entry.value·&&·entry.value·!==·0)` with `⏎··············typeof·entry·!==·"object"·||⏎··············!entry.key·||⏎··············(!entry.value·&&·entry.value·!==·0)⏎············`

Check failure on line 351 in lib/api/controllers/memoryStorageController.js

View workflow job for this annotation

GitHub Actions / Lint - Node.js LTS 20

Replace `typeof·entry·!==·"object"·||·!entry.key·||·(!entry.value·&&·entry.value·!==·0)` with `⏎··············typeof·entry·!==·"object"·||⏎··············!entry.key·||⏎··············(!entry.value·&&·entry.value·!==·0)⏎············`
throw kerror.get(
"invalid_argument",
"entries",
Expand Down

0 comments on commit d8168a8

Please sign in to comment.