Fix not being able to open files with a different extension than .ged (#13)

This commit is contained in:
Przemek Wiech
2019-11-22 21:34:59 +01:00
parent c988f4180e
commit 5286dceaac

View File

@@ -85,10 +85,10 @@ export class TopBar extends React.Component<
}); });
const gedcomFile = const gedcomFile =
files.length === 1 filesArray.length === 1
? files[0] ? filesArray[0]
: filesArray.find((file) => file.name.toLowerCase().endsWith('.ged')) || : filesArray.find((file) => file.name.toLowerCase().endsWith('.ged')) ||
files[0]; filesArray[0];
// Convert uploaded images to object URLs. // Convert uploaded images to object URLs.
const images = filesArray const images = filesArray