Unable to find the registered languages while saving the file. (fix #111788)

This commit is contained in:
Benjamin Pasero 2020-12-08 08:38:03 +01:00
parent 91c7834e92
commit aa18ca6827

View file

@ -283,10 +283,10 @@ export abstract class AbstractFileDialogService implements IFileDialogService {
const filter: IFilter = { name: languageName, extensions: distinct(extensions).slice(0, 10).map(e => trim(e, '.')) };
if (ext && extensions.indexOf(ext) >= 0) {
if (ext && extensions.indexOf(ext) >= 0 && !matchingFilter) {
matchingFilter = filter;
return null; // matching filter will be added last to the top
return null; // first matching filter will be added to the top
}
return filter;