Skip to content

Commit

Permalink
Merge pull request #632 from aswin-s/fix/remove-replace-all
Browse files Browse the repository at this point in the history
fix: remove String.replaceAll polyfill
  • Loading branch information
neil-marcellini authored Jan 15, 2024
2 parents dc5f2af + b000adb commit 1ffd6bc
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 21 deletions.
3 changes: 1 addition & 2 deletions lib/str.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable no-control-regex */
import _ from 'underscore';
import {encode, decode} from 'html-entities';
import replaceAll from 'string.prototype.replaceall';
import {CONST} from './CONST';
import {URL_REGEX} from './Url';

Expand Down Expand Up @@ -1108,7 +1107,7 @@ const Str = {
* @returns {String}
*/
replaceAll(text, searchValue, replaceValue) {
return replaceAll(text, searchValue, replaceValue);
return String.prototype.replaceAll.call(text, searchValue, replaceValue);
},
};

Expand Down
Loading

0 comments on commit 1ffd6bc

Please sign in to comment.