Skip to content

Commit 5b69870

Browse files
committed
fix: improve type checking for index in putTestData function
1 parent 0768328 commit 5b69870

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/src/services/contentMapper.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const putTestData = async (req: Request) => {
8080
});
8181
if (
8282
Array?.isArray?.(contentType) &&
83-
typeof index === "number" &&
83+
Number?.isInteger?.(index) &&
8484
index >= 0 &&
8585
index < contentType?.length
8686
) {

0 commit comments

Comments
 (0)