mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: use replaceAll() instead of replace() when appropriate (#39721)
refactor: use replaceAll() instead of replace() when appropriate
This commit is contained in:
@@ -1128,7 +1128,7 @@ describe('protocol module', () => {
|
||||
protocol.handle('file', (req) => {
|
||||
let file;
|
||||
if (process.platform === 'win32') {
|
||||
file = `file:///${filePath.replace(/\\/g, '/')}`;
|
||||
file = `file:///${filePath.replaceAll('\\', '/')}`;
|
||||
} else {
|
||||
file = `file://${filePath}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user