It attempts to read the property length on undefined. Here is the stacktrace:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
at GalleryTagsPlugin.buildTagCache (plugin:tagged-gallery:8854:58)
at GalleryTagsPlugin.buildCaches (plugin:tagged-gallery:8817:14)
at GalleryTagsPlugin._GalleryTagsPlugin_bootstrap (plugin:tagged-gallery:8900:16)
at t.onLayoutReady (app.js:1:2006913)
at GalleryTagsPlugin.onload (plugin:tagged-gallery:8774:28)
It could probably be related to #22, since I couldn't see any images too, and adding the safe navigation operator solved the problem for me:
new Notice(this.propertyCache['artist']?.length.toString());
Now it gives me another error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'path')
at GalleryInfoView.getState (plugin:tagged-gallery-fix:3287:37)
at t.getViewState (app.js:1:1845798)
at t.pushUndoHistory (app.js:1:2036610)
at t.detach (app.js:1:1848686)
at t.detachLeavesOfType (app.js:1:2026662)
at GalleryInfoView.closeInfoLeaf (plugin:tagged-gallery-fix:3337:30)
at GalleryView.onClose (plugin:tagged-gallery-fix:8672:25)
at GalleryView.<anonymous> (app.js:1:1421862)
at app.js:1:237544
at Object.next (app.js:1:237649)
Hi, I think there could be an error with this line in the
buildTagCache()
method: https://github.com/TomNCatz/obsidian-gallery/blob/4b3e7dd12d8881540655d31263baf9fa624dd06a/src/main.ts#L357It attempts to read the property
length
onundefined
. Here is the stacktrace:It could probably be related to #22, since I couldn't see any images too, and adding the safe navigation operator solved the problem for me:
Now it gives me another error: