fix(mermaid): read-only button shown in view source

This commit is contained in:
Elian Doran 2025-03-22 12:57:32 +02:00
parent 831cd19d0b
commit 2bbd9a4362
No known key found for this signature in database

View File

@ -39,7 +39,9 @@ export default class ToggleReadOnlyButton extends OnClickButtonWidget {
}
isEnabled() {
return super.isEnabled() && this.note?.type === "mermaid";
return super.isEnabled()
&& this.note?.type === "mermaid"
&& this.noteContext?.viewScope?.viewMode === "default";
}
}