client/views: fix incorrectly 'checked' checkboxes
When similar posts were found, the anonymous upload checkbox for that image would become checked, because we treat anything !== undefined as 'checked', and in post_upload_views.js we set 'anonymous' to a querySelector, which returns null on failure and not undefined. Treat null as 'unchecked' to fix this issue, and prevent future mistakes slipping past.
This commit is contained in:
parent
66143dce20
commit
94d145e8d0
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ function makeCheckbox(options) {
|
|||
name: options.name,
|
||||
value: options.value,
|
||||
type: "checkbox",
|
||||
checked: options.checked !== undefined ? options.checked : false,
|
||||
checked: options.checked !== undefined && options.checked !== null ? options.checked : false,
|
||||
disabled: options.readonly,
|
||||
required: options.required,
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue