fix: resolve TypeScript compilation errors after refactoring

- Add missing ExportErrorHandler import in SettingsTab.ts
- Add customEnvironmentVariables property to settings interface
- Fix undefined metadata access with optional chaining in EmbedProcessor.ts
- Update ModalState.ts to use new nested settings structure
- Simplify ExportConfigModal.ts to use full settings object
- Add null safety checks for templateDropdown in GeneralSection.ts
This commit is contained in:
Jarvis committed 2025-09-10 17:06:21 +02:00
1 parent 61ebc10de9
commit 8f75352b15
6 files changed
+30 -43

No files matched your search

+4 -4
View File
@@ -128,16 +128,16 @@ export class GeneralSection implements ModalSection {
// Filter out universal-wrapper.pandoc.typ and clear/repopulate dropdown
const filteredTemplates = templates.filter(template => template !== 'universal-wrapper.pandoc.typ');
this.templateDropdown.selectEl.empty();
this.templateDropdown?.selectEl.empty();
filteredTemplates.forEach(template => {
this.templateDropdown.addOption(template, this.getTemplateDisplayName(template));
this.templateDropdown?.addOption(template, this.getTemplateDisplayName(template));
});
// Restore selection if still available
if (filteredTemplates.includes(currentValue)) {
this.templateDropdown.setValue(currentValue);
this.templateDropdown?.setValue(currentValue);
} else if (filteredTemplates.length > 0) {
this.templateDropdown.setValue(filteredTemplates[0]);
this.templateDropdown?.setValue(filteredTemplates[0]);
}
}