Skip to content

Commit 67ea3ac

Browse files
committed
refactor: remove unused loading and error properties from CommitEmbedModal
1 parent 37045e5 commit 67ea3ac

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

main.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class CommitEmbedModal extends Modal {
2020
private url: string;
2121
private editor: Editor;
2222
private commitData: CommitData | null = null;
23-
private loading = true;
24-
private error: string | null = null;
2523

2624
constructor(app: import('obsidian').App, url: string, editor: Editor) {
2725
super(app);
@@ -41,12 +39,9 @@ class CommitEmbedModal extends Modal {
4139

4240
try {
4341
this.commitData = await this.fetchCommit(this.url);
44-
this.loading = false;
4542
this.renderPreview(previewContainer);
4643
} catch (err) {
47-
this.loading = false;
48-
this.error = (err as Error).message;
49-
previewContainer.setText(`Error: ${this.error}`);
44+
previewContainer.setText(`Error: ${(err as Error).message}`);
5045
}
5146

5247
this.renderButtons(contentEl);

0 commit comments

Comments
 (0)