Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const trimmedFormName = basicDetails.name.trim(); | ||
| const formActive = basicDetails.active; | ||
| const formTags = basicDetails.tags || []; | ||
| const userTags = userData.tags || []; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 5 months ago
The fix involves removing the unused variable declaration for userTags from line 401: const userTags = userData.tags || [];. Since this variable is not referenced elsewhere and its removal does not affect the functionality of the code (the correct variables are being used in the logic that follows), deleting this line (and nothing else) resolves the warning. No additional imports, methods, or definitions are required. The change should take place at line 401, within apps/web/app/(with-contexts)/dashboard/(sidebar)/users/[id]/page.tsx.
| @@ -398,7 +398,6 @@ | ||
| const trimmedFormName = basicDetails.name.trim(); | ||
| const formActive = basicDetails.active; | ||
| const formTags = basicDetails.tags || []; | ||
| const userTags = userData.tags || []; | ||
| // const hasTagsChanged = haveStringArraysChanged(formTags, userTags); | ||
| const hasBasicDetailsChanged = | ||
| trimmedFormName !== initialBasicDetailsRef.current.name || |
In this change, we have introduced