-
Notifications
You must be signed in to change notification settings - Fork 396
style(toolbar): refactor to proper app interface #649
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Comment |
f2f55ff to
c64d9a1
Compare
| ? workspaceInfo.path | ||
| .replace('\\', '/') |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
The best way to address this problem is to ensure that all backslashes in the workspaceInfo.path string are replaced with slashes, not just the first one. In JavaScript, this is achieved by replacing the string literal pattern with a regular expression /\\/g, which matches all backslashes globally. Thus, line 35 should be changed from .replace('\\', '/') to .replace(/\\/g, '/'). This change is confined to the relevant path normalization expression and does not affect any other behavior.
No new imports or utility functions are needed; this can be fixed in-place with standard JavaScript/TypeScript features.
-
Copy modified line R35
| @@ -32,7 +32,7 @@ | ||
| const workspaceDir = useMemo(() => { | ||
| return workspaceInfo | ||
| ? workspaceInfo.path | ||
| .replace('\\', '/') | ||
| .replace(/\\/g, '/') | ||
| .split('/') | ||
| .filter((p) => p !== '') | ||
| .pop() |
No description provided.