Skip to content

Commit

Permalink
refactor: . Extract variable needToForceCheckedProperty for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
claremacrae committed Oct 27, 2024
1 parent 989f11b commit 86bffd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Obsidian/LivePreviewExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class LivePreviewExtension implements PluginValue {
// updates correctly.
// As a "fix", we set the checkbox's `checked` state *explicitly* after a
// timeout in case we need to revert Obsidian's possibly wrongful reversal.
if (toggled.length === 1) {
const needToForceCheckedProperty = toggled.length === 1;
if (needToForceCheckedProperty) {
// The smoke tests show the workaround is only needed when the event replaces
// a single task line.
// (When one task line becomes two because of recurrence, both the
Expand Down

0 comments on commit 86bffd5

Please sign in to comment.