Steps to reproduce
-
In a new vault with no community plugins, create a note
Target.md, and a noteTest.mdwith this content:--- hasOwnProperty: 1 --- # Heading [[Target]] #tag -
Open the developer console (Ctrl+Shift+I) and run:
app.metadataCache.getFileCache(app.vault.getAbstractFileByPath('Test.md'))
Did you follow the troubleshooting guide?
Yes (reproduced in the sandbox vault, no community plugins).
Expected result
hasOwnProperty is an ordinary property name, so the note is indexed as usual: one link to Target, the heading, the tag, and the property.
Actual result
getFileCache returns null. The note loses all its links, headings, tags, sections and properties: Target shows no backlink and #tag is not counted.
A nested key does the same:
---
obj:
hasOwnProperty: 1
---
foo: 1 in the same place is fine.
Environment
SYSTEM INFO:
Obsidian version: 1.14.5
Installer version: 1.14.4
Operating system: Windows 11 Pro 10.0.26300
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Sandbox vault, no community plugins, default theme and settings.
Additional information
It looks like the indexer calls obj.hasOwnProperty(...) on each property object, which a key of that name shadows. Object.prototype.hasOwnProperty.call(obj, key) (or Object.hasOwn) would not be affected.