Skip to content

Commit d7fcb72

Browse files
committed
remove unnecessary string conversion
1 parent 393e1ff commit d7fcb72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sprint-2/interpret/invert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function invert(obj) {
2424
if (Object.prototype.hasOwnProperty.call(invertedObj, String(value))) {
2525
throw new Error(`Duplicate value "${value}" found — cannot invert`);
2626
}
27-
invertedObj[String(value)] = key;
27+
invertedObj[value] = key;
2828
}
2929

3030
return invertedObj;

0 commit comments

Comments
 (0)