Use i - 1 instead of --i
This commit is contained in:
parent
5508f4de56
commit
1a4f5d80f0
@ -56,7 +56,7 @@ export function get(key: string, ...args): string {
|
||||
|
||||
// replace $0 placeholders with args
|
||||
return msg.replace(/\$(\d+)/g, function (str, i) {
|
||||
return args[--i];
|
||||
return args[i - 1];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user