mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix: guard features object in settings to prevent crash on first render
This commit is contained in:
parent
8820874665
commit
0b69aec68b
1 changed files with 5 additions and 0 deletions
|
|
@ -2936,6 +2936,11 @@ class PaperForgeSettingTab extends PluginSettingTab {
|
|||
// --- Vector Database (within Memory Layer) ---
|
||||
containerEl.createEl('h4', { text: 'Vector Database' });
|
||||
|
||||
// Ensure features object exists for upgrades from older settings
|
||||
if (!this.plugin.settings.features) {
|
||||
this.plugin.settings.features = { memory_layer: true, vector_db: false };
|
||||
}
|
||||
|
||||
const vecDescEl = containerEl.createEl('div', { cls: 'paperforge-desc-box' });
|
||||
vecDescEl.style.cssText = 'padding:8px 12px; margin:0 0 8px; background:var(--background-secondary); border-radius:4px; font-size:12px; color:var(--text-muted); line-height:1.5;';
|
||||
vecDescEl.setText(t('feat_vector_desc'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue