Skip to content

Commit

Permalink
Fix _unchecked session removal for arrays
Browse files Browse the repository at this point in the history
Using triple `=== ['_unchecked']` can never return `true`
  • Loading branch information
colinrotherham committed Feb 28, 2024
1 parent e7185f3 commit 2351cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function storeData (input, data) {
let val = input[i]

// Delete values when users unselect checkboxes
if (val === '_unchecked' || val === ['_unchecked']) {
if (val === '_unchecked') {
delete data[i]
continue
}
Expand Down

0 comments on commit 2351cfc

Please sign in to comment.