Skip to content

Commit

Permalink
fix: Don't try to replace strings that doesn't exist (undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimple committed Jun 5, 2022
1 parent 5e4a62d commit 6482711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/destiny2/goalItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Destiny2Goals {
};

this.replaceStringVariables = function (string, profileVariables) {
if (string.indexOf("{var:") === -1) return string;
if (!string || string.indexOf("{var:") === -1) return string;
var matchRegex = /{var:(\d+)}/g;

var allMatches = string.match(matchRegex);
Expand Down

0 comments on commit 6482711

Please sign in to comment.