From 89fef34bf9c21d536a8080189019bdbabc9ab6e6 Mon Sep 17 00:00:00 2001 From: "dr.dimitru" Date: Tue, 14 Jun 2022 16:41:51 +0300 Subject: [PATCH] Minor optimizations --- lib/client/fileUpload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/client/fileUpload.js b/lib/client/fileUpload.js index 4df2d35..ba655bf 100644 --- a/lib/client/fileUpload.js +++ b/lib/client/fileUpload.js @@ -83,7 +83,7 @@ Template.afFileUpload.helpers({ const { accept } = instance; // here we can check for upload template configs, that have been added after 2.1.4 and return either - // an object with "config" merged with "currentUpload" to stay backwards compatible as popssible + // an object with "config" merged with "currentUpload" to stay backwards compatible as possible if (accept) { const config = { config: { accept } }; return Object.assign({}, config, currentUpload); @@ -110,7 +110,7 @@ Template.afFileUpload.helpers({ }, inputAtts(formContext) { const { atts } = formContext; - if (!atts) return; + if (!atts) return {}; delete atts.insertConfig; return atts; }