Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent exception if toggling in unsaved file in Reading mode #1772

Merged
merged 2 commits into from
Mar 20, 2023

Commits on Mar 20, 2023

  1. fix: Prevent exception if toggling in unsaved file in Reading mode

    See the comment #1680 (comment)
    in #1680.
    
    If lines had been deleted from a file, and it was not yet saved when user
    then toggled a line near the end of the file in Reading mode,
    there could be an access of a non-existent line number.
    
    The resultant output was:
    
    plugin:obsidian-tasks-plugin:17605 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'includes')
        at eval (plugin:obsidian-tasks-plugin:17605:14)
        at Generator.next (<anonymous>)
        at fulfilled (plugin:obsidian-tasks-plugin:173:24)
    claremacrae committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    e5f8db8 View commit details
    Browse the repository at this point in the history
  2. comment: Fix typo

    claremacrae committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    6b080db View commit details
    Browse the repository at this point in the history