Skip to content

Commit

Permalink
change asignment of args in global ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Dec 23, 2024
1 parent 38189d3 commit dab4bea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare global {
}

String.prototype.format = function(...args: any[]): string {
args.flat();
args = args.flat(Infinity);
return this.replace(/{(\d+)}/g, function(match, index) {
return typeof args[index] == 'undefined' ? match : args[index];
});
Expand Down

0 comments on commit dab4bea

Please sign in to comment.