From a9b7b5154738710d497a0a16a3b3b4705b39c313 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 22 Jan 2020 17:29:23 +0100 Subject: [PATCH] Check if fileType is an array --- www/filepicker/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/filepicker/inner.js b/www/filepicker/inner.js index 8ee5a56f4..aba1ed77b 100644 --- a/www/filepicker/inner.js +++ b/www/filepicker/inner.js @@ -113,7 +113,7 @@ define([ if (types.indexOf('file') !== -1 && common.isLoggedIn()) { var f = (filters && filters.filter) || {}; delete data.accept; - if (f.fileType) { + if (Array.isArray(f.fileType)) { data.accept = f.fileType.map(function (val) { if (/^[a-z]+\/$/.test(val)) { val += '*';