Skip to content

Commit

Permalink
Fix length of null error
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtanisTheOne committed May 27, 2021
1 parent 3187f5e commit 9c57af2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/core/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,15 @@ function discordPatch (string)

const text = str.slice(1, -1);
const textMatch = text.match(/[a-z\s.!,()0-9]/gi);
if (textMatch.length === text.length)
if (textMatch)
{

match[i] = text;
if (textMatch.length === text.length)
{

match[i] = text;

}

}

Expand Down

0 comments on commit 9c57af2

Please sign in to comment.