mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-28 08:06:01 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user