Skip to content

Commit b625cc1

Browse files
committed
Remove extra assignment
1 parent cad8a5c commit b625cc1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/utils/string/Format.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@
2020
*/
2121
var Format = function (string, values)
2222
{
23-
string = string.replace(/%([0-9]+)/g, function (s, n)
23+
return string.replace(/%([0-9]+)/g, function (s, n)
2424
{
2525
return values[Number(n) - 1];
2626
});
27-
28-
return string;
2927
};
3028

3129
module.exports = Format;

0 commit comments

Comments
 (0)