Browse Source

@uppy/drag-drop: fix `undefined is not a function` TypeError (#3397)

* @uppy/drag-drop: fix typo in `handleDragOver`

Fixes: https://github.com/transloadit/uppy/issues/3385

* @uppy/drag-drop: fix typo in `handleDragLeave`
Antoine du Hamel 3 years ago
parent
commit
bdd1eb54c8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/@uppy/drag-drop/src/index.js

+ 2 - 2
packages/@uppy/drag-drop/src/index.js

@@ -110,7 +110,7 @@ module.exports = class DragDrop extends UIPlugin {
     clearTimeout(this.removeDragOverClassTimeout)
     this.setPluginState({ isDraggingOver: true })
 
-    this.opts?.onDragOver(event)
+    this.opts.onDragOver?.(event)
   }
 
   handleDragLeave (event) {
@@ -124,7 +124,7 @@ module.exports = class DragDrop extends UIPlugin {
       this.setPluginState({ isDraggingOver: false })
     }, 50)
 
-    this.opts?.onDragLeave(event)
+    this.opts.onDragLeave?.(event)
   }
 
   handleDrop = async (event) => {