kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
610 stars 30 forks source link

Bug: Invalidating YAML Breaks Longform Panel #218

Closed b-camphart closed 5 months ago

b-camphart commented 7 months ago

Versions Longform version: 2.0.4 Obsidian version: 1.4.16 OS [e.g. macOS, Windows, iOS, Android]: Windows

Describe the bug Invalidating the YAML breaks the longform panel. If the YAML is repaired, scenes can still be selected, and projects can be switched, but you cannot open another tab until you refresh Obsidian.

To Reproduce Steps to reproduce the behavior:

  1. Open a valid index file
  2. Open the longform explorer view
  3. In source mode, add a tab character before the opening ---
  4. Wait about a second

Expected behavior The Longform panel is still responsive

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'vaultPath')
    at eval (plugin:longform:30821:79)
    at Array.findIndex (<anonymous>)
    at $$self.$$.update (plugin:longform:30821:33)
    at update (plugin:longform:2848:12)
    at flush (plugin:longform:2819:13)