Skip to content

Commit

Permalink
Remove lodash replace
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewMusgrave committed Feb 8, 2019
1 parent 9687934 commit 226b90f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/AppProvider/utilities/Intl/translate.ts
@@ -1,5 +1,4 @@
import get from 'lodash/get';
import replace from 'lodash/replace';
import {
TranslationDictionary,
PrimitiveReplacementDictionary,
Expand All @@ -20,7 +19,7 @@ export default function translate(
}

if (replacements) {
return replace(text, REPLACE_REGEX, (match: string) => {
return text.replace(REPLACE_REGEX, (match: string) => {
const replacement: string = match.substring(1, match.length - 1);

if (!replacements.hasOwnProperty(replacement)) {
Expand Down

0 comments on commit 226b90f

Please sign in to comment.