client/upload: send state of image's anonymous checkbox as boolean

Anonymous checkbox on images would not actually do anything, when the
global checkbox was unchecked. The value of anonymous becomes a node,
and it fails the anonymous === true check in save().
I don't understand why anonymous is treated differently from other
post parameters and supplied as an argument to save().
Keeping it the way it is, I guess...
This commit is contained in:
Eva 2023-05-19 18:25:20 +02:00 committed by neobooru
parent 94d145e8d0
commit d120f00fb5

View file

@ -322,8 +322,8 @@ class PostUploadView extends events.EventTarget {
} }
let anonymous = this._uploadAllAnonymous.checked; let anonymous = this._uploadAllAnonymous.checked;
if (!anonymous) { if (!anonymous && rowNode.querySelector(".anonymous input:checked")) {
anonymous = rowNode.querySelector(".anonymous input:checked"); anonymous = true;
} }
uploadable.anonymous = anonymous; uploadable.anonymous = anonymous;