Use i - 1 instead of --i

This commit is contained in:
Forbes Lindesay 2015-11-06 14:52:25 +00:00
parent 5508f4de56
commit 1a4f5d80f0

View File

@ -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];
});
}