mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-18 21:48:24 -04:00
fix: fix nullable problems found via AttachmentViewer test
This commit is contained in:
+5
-3
@@ -2987,8 +2987,10 @@ window.PrivateBin = (function () {
|
|||||||
me.hideAttachment();
|
me.hideAttachment();
|
||||||
me.hideAttachmentPreview();
|
me.hideAttachmentPreview();
|
||||||
attachment.innerHTML = '';
|
attachment.innerHTML = '';
|
||||||
attachmentPreview.innerHTML = '';
|
if (attachmentPreview) {
|
||||||
dragAndDropFileNames.innerHTML = '';
|
attachmentPreview.innerHTML = '';
|
||||||
|
}
|
||||||
|
me.clearDragAndDrop();
|
||||||
|
|
||||||
AttachmentViewer.removeAttachmentData();
|
AttachmentViewer.removeAttachmentData();
|
||||||
};
|
};
|
||||||
@@ -3027,7 +3029,7 @@ window.PrivateBin = (function () {
|
|||||||
* @param {string[]} fileNames
|
* @param {string[]} fileNames
|
||||||
*/
|
*/
|
||||||
function printDragAndDropFileNames(fileNames) {
|
function printDragAndDropFileNames(fileNames) {
|
||||||
dragAndDropFileNames.innerHTML = '';
|
me.clearDragAndDrop();
|
||||||
fileNames.forEach(fileName => {
|
fileNames.forEach(fileName => {
|
||||||
const name = document.createTextNode(fileName);
|
const name = document.createTextNode(fileName);
|
||||||
dragAndDropFileNames.appendChild(name);
|
dragAndDropFileNames.appendChild(name);
|
||||||
|
|||||||
Reference in New Issue
Block a user