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

WIP: Fix null exception in directory item selector #549

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function updatedTree(prevRoots: any[], prevMap: any, nodeId: UUID | null, childr
return pn;
}
if (pn.parentUuid !== nodeId) {
console.warn(`reparent ${pn.parentUuid} -> ${nodeId}`);
console.warn(`reparent ${pn?.parentUuid} -> ${nodeId}`);
Copy link
Contributor

@capyq capyq Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understant how it fix null exception.

if your optional chainning is the fix, that mean that "pn" is undefined.
and line 79 if "pn" is undefined you will get the same null exception.

line 68 if "pn" is undefined we return a value, so line 80 pn couldn't be undefined.

Copy link
Contributor Author

@jamal-khey jamal-khey Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for the confusion. The title of the pull request was a mistake, and the bug is not resolved yet. I will investigate further to address the root cause of the issue.
in fact i think the issue is related to a data migration . it's not reproducible

}
return {
...pn,
Expand Down
Loading