diff --git a/src/node-explorer-provider.ts b/src/node-explorer-provider.ts index 58674fe..65f9643 100644 --- a/src/node-explorer-provider.ts +++ b/src/node-explorer-provider.ts @@ -703,7 +703,7 @@ export class NodeExplorerProvider async (node: PeerRoot | FileExplorer) => { const { addr, path } = extractAddrAndPath(node); - if (addr && this.configManager.config.hosts?.[addr].persistToSSHConfig !== false) { + if (addr && this.configManager.config.hosts?.[addr]?.persistToSSHConfig !== false) { await syncSSHConfig(addr, this.configManager); }