Skip to content

Commit

Permalink
fix: Change replaceAll for replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Proskynete committed Mar 8, 2022
1 parent 37b1ded commit 392ff25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/cjs/helpers/text.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearString = void 0;
var clearString = function (str) {
return str.replaceAll('-', ' ').replaceAll('_', ' ');
return str.replace(/-/g, ' ').replace(/_/g, ' ');
};
exports.clearString = clearString;
2 changes: 1 addition & 1 deletion lib/esm/helpers/text.helper.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export var clearString = function (str) {
return str.replaceAll('-', ' ').replaceAll('_', ' ');
return str.replace(/-/g, ' ').replace(/_/g, ' ');
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vertical-timeline-component-react",
"version": "3.0.1",
"version": "3.0.2",
"description": "A simple component for create a vertical timeline with React",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/text.helper.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const clearString = (str: string) =>
str.replaceAll('-', ' ').replaceAll('_', ' ');
str.replace(/-/g, ' ').replace(/_/g, ' ');

0 comments on commit 392ff25

Please sign in to comment.