setupTodos using incorrect logic and skipping to-do item.#705
Merged
svilenmarkov merged 1 commit intoglanceapp:devfrom Jun 10, 2025
Merged
setupTodos using incorrect logic and skipping to-do item.#705svilenmarkov merged 1 commit intoglanceapp:devfrom
svilenmarkov merged 1 commit intoglanceapp:devfrom
Conversation
svilenmarkov
approved these changes
Jun 10, 2025
Member
svilenmarkov
left a comment
There was a problem hiding this comment.
Thanks for contributing!
Zykairotis
pushed a commit
to Zykairotis/glanceXags
that referenced
this pull request
Jan 8, 2026
setupTodos using incorrect logic and skipping to-do item.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After looking over #703, I realized that
todo.default(elems[i])in page.js was overwriting elements while still reading over them in the loop.This causes a Todo element to "disappear" as it takes the position of the overwritten element and being skipped in the iteration.
The fix is to create a copy of the element array so that it is maintained while changes are being made to the document.