generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent null selectedDraft from breaking render (#219)
* Prevent null selectedDraft from breaking render * Remove unnecessary (triple) check * Early return if selectedDraft is null * Provide default value of `currentDraftIndex` Also adds checks for it being greater than `0` where needed. * Remove unnecessary binding, which caused error For some reason, this binding sometimes would have an `undefined` value, which was then set in the steps of the current workflow (possibly due to refresh from an unpopulated compile step). * Fix style issues - Use `!draft` instead of `draft == null` - Always include curly braces for `if` statements
- Loading branch information
1 parent
85a2789
commit 8f45706
Showing
3 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters