Skip to content

Commit

Permalink
feat(obsidian): show notice when Response is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
elijah-potter committed Feb 4, 2025
1 parent ea05e94 commit a059c9c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/obsidian-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logoSvg from '../logo.svg';
import { Plugin, Menu, PluginManifest, App } from 'obsidian';
import { Plugin, Menu, PluginManifest, App, Notice } from 'obsidian';
import { LintConfig, Linter, Suggestion } from 'harper.js';
import { LocalLinter, SuggestionKind, WorkerLinter } from 'harper.js';
import { linter } from './lint';
Expand Down Expand Up @@ -81,6 +81,11 @@ export default class HarperPlugin extends Plugin {
}

async onload() {
if (typeof Response == 'undefined') {
new Notice('Please update your Electron version before running Harper.', 0);
return;
}

const data = await this.loadData();
await this.initializeFromSettings(data);
this.registerEditorExtension(this.editorExtensions);
Expand Down

0 comments on commit a059c9c

Please sign in to comment.