client/posts: fix upload error caused by anonymous node
Anonymous node does not exist in view when a user without anonymous upload permission tries to post upload. So in this case we should check for the existence of anonymousNode first.
This commit is contained in:
parent
d39439d549
commit
2bf361c64a
1 changed files with 4 additions and 2 deletions
|
@ -283,8 +283,10 @@ class PostUploadView extends events.EventTarget {
|
||||||
uploadable.safety = safetyNode.value;
|
uploadable.safety = safetyNode.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadable.anonymous =
|
const anonymousNode = rowNode.querySelector('.anonymous input:checked');
|
||||||
rowNode.querySelector('.anonymous input').checked;
|
if (anonymousNode) {
|
||||||
|
uploadable.anonymous = true;
|
||||||
|
}
|
||||||
|
|
||||||
uploadable.flags = [];
|
uploadable.flags = [];
|
||||||
if (rowNode.querySelector('.loop-video input:checked')) {
|
if (rowNode.querySelector('.loop-video input:checked')) {
|
||||||
|
|
Loading…
Reference in a new issue