Skip to content

Commit

Permalink
feat: add replaceAll polyfill to be compatible with Firefox 68
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Aug 17, 2024
1 parent fdc1be9 commit 85cbb7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ import * as serviceWorker from "./serviceWorker";
import {BrowserRouter} from "react-router-dom";
import "./backend/FetchFilter";

if (!String.prototype.replaceAll) {
String.prototype.replaceAll = function(search, replace) {
return this.split(search).join(replace);
};
}

const container = document.getElementById("root");

const app = createRoot(container);
Expand Down

0 comments on commit 85cbb7d

Please sign in to comment.