mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Use JavaScript Optional chaining
This commit is contained in:
parent
d9bc435e2c
commit
732b6eb641
55 changed files with 169 additions and 199 deletions
|
|
@ -70,7 +70,7 @@
|
|||
htmlDrag = b => doc.documentElement.classList.toggle('firefox-drag', b),
|
||||
|
||||
setDragImage = (src, xOffset, yOffset) => {
|
||||
img && img.remove();
|
||||
img?.remove();
|
||||
if (src) {
|
||||
// create drag image from custom element or drag source
|
||||
img = src.cloneNode(true);
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
if (dragSource) {
|
||||
clearInterval(holdInterval);
|
||||
// dispose of drag image element
|
||||
img && img.remove();
|
||||
img?.remove();
|
||||
isDragging && dispatchEvent(lastTouch, 'dragend', dragSource);
|
||||
img = dragSource = lastTouch = lastTarget = dataTransfer = holdInterval = null;
|
||||
isDragging = allowDrop = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue