silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.01k stars 138 forks source link

Fix `allKnownFiles` not being updated for `pageExists()` #900

Closed MrMugame closed 1 week ago

MrMugame commented 1 week ago

The mapping of the files to page names has to happen with every call to pageExists() as the underling array will change. Initially it's even empty and never updating it will cause the resulting mapped set to stay empty. This would mean pageExists() returnes false every time.

This issue was introduced with 1f94915 and is thus still pretty new, which is probably why it was unnoticed until now.

zefhemel commented 1 week ago

Right. I think I noticed this once. Didn't have time to look into it immediately and then forgot. Nice catch!