-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: main
Are you sure you want to change the base?
WIP: Fix null exception in directory item selector #549
Conversation
…ined-previousNode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we have seen together, there are cases where behavior is strange. It's best to ask the PO about the reproduction scenario and the various test cases.
@@ -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}`); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
This pull request fixes an issue where the directory item selector's
updatedTree
function could throw a null exception.this issu happen in modification by formula , when selecting a filter and then moving it to another directory. when the user re-click on the chip of the filter , the derictory can not be selected