Skip to content

Commit aabad30

Browse files
committed
fixed error
1 parent 1a4482e commit aabad30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-3/1-implement-and-rewrite-tests/implement/3-get-card-value.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function getCardValue(card) {
4848

4949
const num = Number(rank);
5050
// if card is a number card and card is bigger than 2 and less than 10 ("2" to "10"), should return its numerical value
51-
if (rank !== String(num) || num < 2 || num > 10) {
51+
if (!Number.isInteger(num) || rank !== String(num) || num < 2 || num > 10) {
5252
throw new Error("Error invalid card");
5353
}
5454
return num;

0 commit comments

Comments
 (0)