Skip to content

Commit 21b3ed6

Browse files
authored
Eliminate usage of String.prototype.replaceAll to avoid incompatibility with old browsers (#1015)
1 parent 90cadc7 commit 21b3ed6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

portal-ui/src/common/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { ErrorResponseHandler } from "../types";
2222

2323
export class API {
2424
invoke(method: string, url: string, data?: object) {
25-
const targetURL = `${baseUrl}${url}`.replaceAll("//", "/");
25+
const targetURL = `${baseUrl}${url}`.replace(/\/\//g, "/");
2626
return request(method, targetURL)
2727
.send(data)
2828
.then((res) => res.body)

0 commit comments

Comments
 (0)