Fixes indentation and adds debug logging
Corrects inconsistent indentation in FrontmatterProcessor methods to improve code readability. Adds debug logging for unexpected types in frontmatter display formatting to aid troubleshooting. Improves robustness of font settings handling by clarifying fallback behavior on load failure in TypographySection. Relates to obsidian-bot-review
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -324,6 +324,7 @@ export class FrontmatterProcessor {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Handle null, undefined, or any other unexpected types
|
// Handle null, undefined, or any other unexpected types
|
||||||
|
console.debug('FrontmatterProcessor: Unexpected type in frontmatter display formatting', `key: ${key}, type: ${typeof value}`);
|
||||||
formattedValue = '';
|
formattedValue = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export class TypographySection implements ModalSection {
|
|||||||
// Font size settings are created after font dropdowns to preserve logical ordering
|
// Font size settings are created after font dropdowns to preserve logical ordering
|
||||||
this.createFontSettings(state).catch(error => {
|
this.createFontSettings(state).catch(error => {
|
||||||
console.error('Failed to create font settings:', error);
|
console.error('Failed to create font settings:', error);
|
||||||
// Font settings will fall back to default fonts if this fails
|
// If font loading fails, getAvailableFonts will use hardcoded fallback fonts
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user