Skip to content

Commit 945da4f

Browse files
committed
Refactor: Remove dotenv import from esbuild.js and improve error handling in post_process function
1 parent dd8b008 commit 945da4f

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

esbuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import esbuild from 'esbuild';
22
import path from 'path';
3-
import 'dotenv/config';
43
import { build_plugin } from 'obsidian-smart-env/build/build_plugin.js';
54
import { build_smart_env_config } from 'obsidian-smart-env/build/build_env_config.js';
65
import { create_banner } from './src/utils/banner.js';

src/components/connections-list/v4.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ export async function post_process(connections_list, container, opts = {}) {
3838
this.empty(graph_container);
3939
graph_container.appendChild(graph);
4040
register_graph_events(graph, list_container);
41-
} catch () {
41+
} catch (_err) {
4242
this.empty(graph_container);
43+
const error_message = this.create_doc_fragment(`<p class="sc-graph-error">Unable to load graph visualization: ${typeof _err?.message === 'string' ? _err.message : 'Unknown error'}</p>`);
44+
graph_container.appendChild(error_message);
4345
}
4446
}
4547

src/components/connections-settings/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export class ScProSupportModal extends Modal {
9696
this.titleEl.setText('Need help and support?');
9797
const content = this.contentEl.createDiv({ cls: 'sc-pro-support-modal' });
9898
content.createEl('p', {
99-
text: 'Reply to your pro plugins welcome email for priority support.',
99+
text: 'Reply to your Pro plugins welcome email for priority support.',
100100
});
101101
// continue to report a bug button
102102
const reportBugButton = content.createEl('button', { text: 'Report a bug', cls: 'mod-warning' });

0 commit comments

Comments
 (0)