e2corporation commented on code in PR #2926:
URL: https://github.com/apache/incubator-devlake/pull/2926#discussion_r964328007
##########
config-ui/src/hooks/useDataScopesManager.jsx:
##########
@@ -137,7 +138,8 @@ function useDataScopesManager ({ provider, blueprint, /*
connection, */ settings
newScope = projects[connection.id]?.map((p) => ({
...newScope,
options: {
- projectId: Number(p),
+ projectId: Number(p.value),
Review Comment:
It's not about covering up bugs, for vars that are dynamic when components
are unmounted/mounted react will throw a warning unnecessarily. Optional
chaining will allow code-flow to continue even though we don't expect or prefer
p to be null. Any valid bug will present itself in the UI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]