You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked my configurations files and the documentation
Command used
Refresh published and upload new notes
Plugin version
6.7.1
Describe the bug
I was able to publish some individual notes just fine, but when I tried to reftesh and upload several notes at once, I got this bug.
plugin:obsidian-mkdocs-publisher:19 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toString')
at ce (plugin:obsidian-mkdocs-publisher:19:53057)
at Ys.getAllFileWithPath (plugin:obsidian-mkdocs-publisher:28:10213)
at eval (plugin:obsidian-mkdocs-publisher:23:20428)
at Generator.next (<anonymous>)
at eval (plugin:obsidian-mkdocs-publisher:2:871)
at new Promise (<anonymous>)
at m (plugin:obsidian-mkdocs-publisher:2:691)
at so (plugin:obsidian-mkdocs-publisher:23:20333)
at eval (plugin:obsidian-mkdocs-publisher:23:22746)
at Generator.next (<anonymous>)
After some picking around I figured out the issue: one of my notes had the "share" property empty instead of true or false. After turning it to false the bug vanished. I looked at the code, and the thing is, it does not check if the property equals exactly null, and Obsidian does not treat null and false as the same thing anymore. It seems to be easy enough to fix, just add additional check for null along with undefined.
How to reproduce ?
Create the note with the empty share property (can be created in the source mode) and try to share it of several notes at once.
Minimal Reproducible Example
-
Configuration
-
Relevant log output
No response
OS
No response
Anything else?
No response
Obsidian information
-
The text was updated successfully, but these errors were encountered:
Obsidian doesn't treat an empty property as a "non existant" property. So, undefined & null are different:
- null → The key exists, but the value is empty (null)
- undefined → The key doesn't exist
An empty value → create a crash
fix [Plugin][Bug]: Bug when share is empty #226
Issue validation
Command used
Refresh published and upload new notes
Plugin version
6.7.1
Describe the bug
I was able to publish some individual notes just fine, but when I tried to reftesh and upload several notes at once, I got this bug.
After some picking around I figured out the issue: one of my notes had the "share" property empty instead of true or false. After turning it to false the bug vanished. I looked at the code, and the thing is, it does not check if the property equals exactly null, and Obsidian does not treat null and false as the same thing anymore. It seems to be easy enough to fix, just add additional check for null along with undefined.
How to reproduce ?
Create the note with the empty share property (can be created in the source mode) and try to share it of several notes at once.
Minimal Reproducible Example
-
Configuration
-
Relevant log output
No response
OS
No response
Anything else?
No response
Obsidian information
The text was updated successfully, but these errors were encountered: