Remove usage of String.replaceAll

It works in electron, but it's not part of ES2020
This commit is contained in:
Labhansh Agrawal 2021-04-07 15:40:20 +05:30
parent ef8350a68b
commit 319d019768

View file

@ -187,7 +187,7 @@ please check the shell config: ${JSON.stringify({shell, shellArgs}, undefined, 2
fallback to default shell config: ${JSON.stringify(defaultShellConfig, undefined, 2)} fallback to default shell config: ${JSON.stringify(defaultShellConfig, undefined, 2)}
`; `;
console.warn(msg); console.warn(msg);
this.batcher?.write(msg.replaceAll('\n', '\r\n') as any); this.batcher?.write(msg.replace(/\n/g, '\r\n') as any);
this.init({uid, rows, cols: columns, cwd, ...defaultShellConfig}); this.init({uid, rows, cols: columns, cwd, ...defaultShellConfig});
} else { } else {
this.ended = true; this.ended = true;