easy-file-system 1.3.132 → 1.3.134

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,16 @@ import { FILE_NAME_DRAG_ENTRY_TYPE, FILE_NAME_MARKER_ENTRY_TYPE, DIRECTORY_NAME_
13
13
 
14
14
  export default class DirectoryNameDragEntryItem extends DragEntryItem {
15
15
  dropHandler = (dragElement, aborted, element, done) => {
16
- const markerEntryItem = this.retrieveMarkerEntryItem(),
16
+ const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
17
+
18
+ if (!dragElementDragEntryItem) {
19
+ done();
20
+
21
+ return;
22
+ }
23
+
24
+ const dragEntryItem = dragElement, ///
25
+ markerEntryItem = this.retrieveMarkerEntryItem(),
17
26
  markerEntryItemExplorer = markerEntryItem.getExplorer();
18
27
 
19
28
  if (aborted) {
@@ -24,12 +33,16 @@ export default class DirectoryNameDragEntryItem extends DragEntryItem {
24
33
  return;
25
34
  }
26
35
 
27
- const dragEntryItem = dragElement; ///
28
-
29
36
  markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
30
37
  }
31
38
 
32
39
  dragOverHandler = (dragElement, element) => {
40
+ const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
41
+
42
+ if (!dragElementDragEntryItem) {
43
+ return;
44
+ }
45
+
33
46
  const collapsed = this.isCollapsed();
34
47
 
35
48
  if (collapsed) {
@@ -38,7 +38,7 @@ class DragEntryItem extends EntryItem {
38
38
  return;
39
39
  }
40
40
 
41
- const dragEntryItem = dragElement; ///
41
+ const dragEntryItem = element; ///
42
42
 
43
43
  markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
44
44
  }
package/src/rubbishBin.js CHANGED
@@ -6,6 +6,7 @@ import { dropMixins } from "easy-drag-and-drop";
6
6
  import { Element, eventTypes } from "easy";
7
7
  import { asynchronousUtilities } from "necessary";
8
8
 
9
+ import DragEntryItem from "./item/entry/drag";
9
10
  import OpenRubbishBinSVG from "./svg/rubbishBin/open";
10
11
  import ClosedRubbishBinSVG from "./svg/rubbishBin/closed";
11
12
  import FileNameMarkerEntryItem from "./item/entry/marker/fileName";
@@ -20,7 +21,16 @@ const { forEach } = asynchronousUtilities,
20
21
 
21
22
  class RubbishBin extends Element {
22
23
  dropHandler = (dragElement, aborted, element, done) => {
23
- const markerEntryItem = this.retrieveMarkerEntryItem(),
24
+ const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
25
+
26
+ if (!dragElementDragEntryItem) {
27
+ done();
28
+
29
+ return;
30
+ }
31
+
32
+ const dragEntryItem = dragElement, ///
33
+ markerEntryItem = this.retrieveMarkerEntryItem(),
24
34
  markerEntryItemExplorer = markerEntryItem.getExplorer();
25
35
 
26
36
  if (aborted) {
@@ -31,12 +41,16 @@ class RubbishBin extends Element {
31
41
  return;
32
42
  }
33
43
 
34
- const dragEntryItem = dragElement; ///
35
-
36
44
  markerEntryItemExplorer.dropDragEntryItem(dragEntryItem, done);
37
45
  }
38
46
 
39
47
  dragOverHandler = (dragElement, element) => {
48
+ const dragElementDragEntryItem = (dragElement instanceof DragEntryItem);
49
+
50
+ if (!dragElementDragEntryItem) {
51
+ return;
52
+ }
53
+
40
54
  const dragEntryItem = dragElement, ///
41
55
  dragEntryItemExplorer = dragEntryItem.getExplorer(),
42
56
  dragEntryItemExplorerIgnored = this.isExplorerIgnored(dragEntryItemExplorer);