fix: don't display all apps for extensionless files

This hides database entries with empty types from the list of suggested
apps for files that have no extension. These entries should also be
removed from the database and the bug causing them should be fixed in
dev center.
This commit is contained in:
KernelDeimos
2024-10-11 14:51:52 -04:00
parent 38dcb60d3f
commit 010282edf2
+3
View File
@@ -276,6 +276,9 @@ async function refresh_associations_cache(){
for ( const association of associations ) {
let ext = association.type;
if ( ext.startsWith('.') ) ext = ext.slice(1);
// Default file association entries were added with empty types;
// this prevents those from showing up.
if ( ext === '' ) continue;
if ( ! lists.hasOwnProperty(ext) ) lists[ext] = [];
lists[ext].push(association.app_id);
}