Skip to content

Commit

Permalink
bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Peltekov committed Jun 19, 2018
1 parent 1fec5ea commit 69e4f04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Change Log
### [4.0.6](https://github.com/georgipeltekov/ngx-file-drop/compare/v4.0.5...v4.0.6) (2018-06-19)
* Bug fixing

### [4.0.5](https://github.com/georgipeltekov/ngx-file-drop/compare/v4.0.4...v4.0.5) (2018-06-19)
* Fix for big, nested folder structure

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-file-drop",
"version": "4.0.5",
"version": "4.0.6",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down
5 changes: 1 addition & 4 deletions src/lib/ngx-drop/file-drop.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,9 @@ export class FileComponent implements OnDestroy {

const timerObservable = timer(200, 200);
this.subscription = timerObservable.subscribe(t => {
if (this.files.length > 0) {
if (this.files.length > 0 && this.numOfActiveReadEntries === 0) {
this.onFileDrop.emit(new UploadEvent(this.files));
this.files = [];
if (this.numOfActiveReadEntries === 0) {
this.subscription.unsubscribe();
}
}
});
}
Expand Down

0 comments on commit 69e4f04

Please sign in to comment.