Skip to content

Commit

Permalink
fix: do not change property
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorosty committed Jan 26, 2024
1 parent 26614e9 commit b392800
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,16 +454,10 @@ export default class Window extends EventEmitter {

// DnD functionality
if (this.attributes.droppable) {
/*
`this.attributes.droppable` should probably always be an object
and never be set to `true`.
The following code is only to update the setting for legacy applications.
*/
if (this.attributes.droppable === true) {
this.attributes.droppable = {};
}
const {dataTransferProperty = 'files'} = this.attributes.droppable === true
? {}
: this.attributes.droppable;

const {dataTransferProperty = 'files'} = this.attributes.droppable;
const d = droppable(this.$element, {
ondragenter: (...args) => this.emit('dragenter', ...args, this),
ondragover: (...args) => this.emit('dragover', ...args, this),
Expand Down

0 comments on commit b392800

Please sign in to comment.