Skip to content

Commit

Permalink
Eliminate usage of String.prototype.replaceAll to avoid incompatibili…
Browse files Browse the repository at this point in the history
…ty with old browsers (minio#1015)
  • Loading branch information
bianjp authored Sep 8, 2021
1 parent 90cadc7 commit 21b3ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portal-ui/src/common/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { ErrorResponseHandler } from "../types";

export class API {
invoke(method: string, url: string, data?: object) {
const targetURL = `${baseUrl}${url}`.replaceAll("//", "/");
const targetURL = `${baseUrl}${url}`.replace(/\/\//g, "/");
return request(method, targetURL)
.send(data)
.then((res) => res.body)
Expand Down

0 comments on commit 21b3ed6

Please sign in to comment.