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:
6 files changed
+30
-43
No files matched your search
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user