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