From 9d9d6ca20bc89c6954248e9b19772e136110d0d3 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Tue, 15 May 2018 22:28:28 +0200 Subject: [PATCH] Fix empty description when only one extension is given --- atom/browser/web_dialog_helper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/web_dialog_helper.cc b/atom/browser/web_dialog_helper.cc index 563557610bb9..b2827fdfd6f3 100644 --- a/atom/browser/web_dialog_helper.cc +++ b/atom/browser/web_dialog_helper.cc @@ -168,10 +168,10 @@ file_dialog::Filters GetFileTypesFromAcceptType( filters.push_back(file_dialog::Filter()); - if (valid_type_count > 1 || - (valid_type_count == 1 && description.empty() && extensions.size() > 1)) + if (valid_type_count > 1 || (valid_type_count == 1 && description.empty())) description = "Custom Files"; + DCHECK(!description.empty()); filters[0].first = description; for (const auto& extension : extensions) {