Skip to content

Commit

Permalink
Merge pull request #79 from donaldwasserman/master
Browse files Browse the repository at this point in the history
Fix for #42 -- Changed logic on file type array
  • Loading branch information
tim-evans authored Nov 9, 2017
2 parents 6e889be + 073e9a3 commit dfa1292
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
npm-debug.log*
yarn-error.log
testem.log
.idea

# ember-try
.node_modules.ember-try/
Expand Down
10 changes: 5 additions & 5 deletions addon/system/drag-listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ export default class {

getEventSource(evt) {
let types = evt.dataTransfer.types || [];
let areAllTypesFiles = true;
let areSomeTypesFiles = false;
for (let i = 0, len = types.length; i < len; i++) {
if (types[i] !== 'Files' &&
types[i] !== 'application/x-moz-file') {
areAllTypesFiles = false;
if (types[i] === 'Files' ||
types[i] === 'application/x-moz-file') {
areSomeTypesFiles = true;
break;
}
}
return areAllTypesFiles ? 'os' : 'web';
return areSomeTypesFiles ? 'os' : 'web';
}

dragenter(evt) {
Expand Down

0 comments on commit dfa1292

Please sign in to comment.