Skip to content

Commit c2530cc

Browse files
Fixed properties view plugin wrong name and first enable load error
1 parent 46f1a42 commit c2530cc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/canvas-extensions/frontmatter-control-button-canvas-extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default class FrontmatterControlButtonCanvasExtension extends CanvasExten
2828
callback: () => {
2929
const propertiesPlugin = this.plugin.app.internalPlugins.plugins['properties']
3030
if (!propertiesPlugin?._loaded) {
31-
new Notice(`Core plugin "Properties" was not found or isn't enabled.`)
31+
new Notice(`Core plugin "Properties view" was not found or isn't enabled. Enable it and restart Obsidian.`)
3232
return
3333
}
3434

src/patchers/properties-patcher.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { TFile } from "obsidian"
55
export default class PropertiesPatcher extends Patcher {
66
protected async patch() {
77
if (!this.plugin.settings.getSetting('canvasMetadataCompatibilityEnabled')) return
8+
if (!this.plugin.app.viewRegistry.viewByType["file-properties"]) return // Core plugin not enabled
89

910
const that = this
1011
await Patcher.waitForViewRequest<PropertiesView>(this.plugin, "file-properties", view => {

0 commit comments

Comments
 (0)