Make sure excluded mime types are type of string before splitting them, avoid js error "Uncaught typeError: ex_mime.split is not a function"

This commit is contained in:
Hadi Nategh 2019-10-02 13:52:48 +02:00
parent d798c6763a
commit 7ca76b9160

View File

@ -772,7 +772,7 @@ function egw_get_file_editor_prefered_mimes(_mime)
{
ex_mimes = !ex_mimes ? _mime : ex_mimes+','+_mime;
}
if (fe && fe.mime && ex_mimes)
if (fe && fe.mime && ex_mimes && typeof ex_mimes === 'string')
{
ex_mimes = ex_mimes.split(',');
for (var mime in fe.mime)