From 088b8de9489ff7e234330ea5b7d8630c4569ee72 Mon Sep 17 00:00:00 2001 From: Ken Southerland Date: Fri, 17 Dec 2021 14:58:05 -0800 Subject: [PATCH] Allow additionalParameters to also be null --- libs/ng2-file-upload/file-upload/file-uploader.class.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ng2-file-upload/file-upload/file-uploader.class.ts b/libs/ng2-file-upload/file-upload/file-uploader.class.ts index 52fb453..30e0672 100644 --- a/libs/ng2-file-upload/file-upload/file-uploader.class.ts +++ b/libs/ng2-file-upload/file-upload/file-uploader.class.ts @@ -318,7 +318,7 @@ export class FileUploader { } // For AWS, Additional Parameters must come BEFORE Files - if (this.options.additionalParameter !== undefined) { + if (this.options.additionalParameter) { Object.keys(this.options.additionalParameter).forEach((key: string) => { let paramVal = this.options.additionalParameter?.[ key ]; // Allow an additional parameter to include the filename