mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
fix: prevent toolbar button injection when no active markdown view
This commit is contained in:
parent
841b3af5a4
commit
bbb3630a8f
1 changed files with 2 additions and 1 deletions
|
|
@ -161,7 +161,8 @@ export class QuickActionsService {
|
|||
|
||||
private injectToolbarButton() {
|
||||
const actionsView = this.workSpaceService.getViewActionsView();
|
||||
if (!actionsView || actionsView.querySelector(".vault-keeper-ai-actions")) {
|
||||
const view = this.workSpaceService.getActiveViewOfType(MarkdownView);
|
||||
if (!actionsView || !view || actionsView.querySelector(".vault-keeper-ai-actions")) {
|
||||
return;
|
||||
}
|
||||
const button = createEl("button", { cls: "clickable-icon view-action vault-keeper-ai-actions" });
|
||||
|
|
|
|||
Loading…
Reference in a new issue