-
Notifications
You must be signed in to change notification settings - Fork 1
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
Files with computed name #607
base: fix-login-button-603
Are you sure you want to change the base?
Conversation
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
const {fileName: fileNameUuid, fileNameCalculated} = | ||
node?.value?.fileName; |
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.
this one looks wrong, it should be:
const {fileName: fileNameUuid, fileNameCalculated} =
node?.value ?? {}
@@ -86,7 +86,7 @@ const NodeValueRender = ({node = false, nodeDef}) => { | |||
return ( | |||
<> | |||
<Container> | |||
{node?.value ? ( | |||
{node?.value && node?.value?.fileName ? ( |
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.
it could be simply node?.value?.fileName
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.
there are also helper methods in arena-core for this, e.g. NodeValues.getFileName
@@ -59,7 +65,7 @@ const useFile = ({nodeDef, node, isImage = false}) => { | |||
const deleteFile = useCallback(() => { | |||
handleDelete({ | |||
node, | |||
label: node?.value?.fileName, | |||
label: node?.value?.fileNameCalculated, |
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.
in this case, if fileNameCalculated is missing it should default to something else
also please check the SonarCloud issues |
No description provided.