Oliver-Akins / file-hider

A plugin for https://obsidian.md that allows hiding specific files and folders from the file explorer.
MIT License
60 stars 12 forks source link

Initialize styles in `layoutReady` #8

Closed Oliver-Akins closed 2 years ago

Oliver-Akins commented 2 years ago

https://github.com/Oliver-Akins/file-hider/blob/716e12aa4051af0a2c481839166d75bfdb2501a4/src/main.ts#L103

If there's an issue that causes the findStyleSheet to always return null, then users could end up in an infinite loop here. I suggest removing this redundancy and instead just initialize the styles inside layoutReady.


From: https://github.com/obsidianmd/obsidian-releases/pull/978#issuecomment-1144033126