likyh commented on code in PR #2926:
URL: https://github.com/apache/incubator-devlake/pull/2926#discussion_r964316001
##########
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:
We shouldn't use `?.` too much if we could know p is not null. Because it
will cover up some bugs such as p is not a object.
--
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]