Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
reader.onload = () => {
let tags: { [key: string]: any };
try {
tags = ExifReader.load(reader.result as ArrayBuffer);
} catch (e) {
tags = {};
}
const keywords: string[] = [];
// try {
// keywords.push(...tags.Keywords.description.split(',').map(x => x.trim()).filter(x => x));
// } catch (e) {
// // ignore
// }
//
// try {
// keywords.push(...tags.subject.value.map(({ description }) => description));
// } catch (e) {
// // ignore