From 142e4155d4a6bbc6beb8266090be5426a37fc4b7 Mon Sep 17 00:00:00 2001 From: Valentin Funk Date: Sun, 8 Jan 2017 17:18:36 +0100 Subject: [PATCH] Use [].fiter as FileList has no method 'filter' (#177) Fixes #167 --- src/directives/ng-file-select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directives/ng-file-select.ts b/src/directives/ng-file-select.ts index 5c27dd55..e3f8b4d6 100644 --- a/src/directives/ng-file-select.ts +++ b/src/directives/ng-file-select.ts @@ -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; }