Skip to content

Commit

Permalink
Use [].fiter as FileList has no method 'filter' (bleenco#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinFunk authored and jkuri committed Jan 8, 2017
1 parent f4e11ce commit 142e415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives/ng-file-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class NgFileSelectDirective implements OnChanges {
}

if (this.options.filterExtensions && this.options.allowedExtensions && this.files && this.files.length) {
this.files = this.files.filter(f => {
this.files = [].filter.call(this.files, f => {
if (this.options.allowedExtensions.indexOf(f.type) !== -1) {
return true;
}
Expand Down

0 comments on commit 142e415

Please sign in to comment.