Skip to content

Commit d653ffb

Browse files
committed
Fix API 8 test issue
Signed-off-by: Mlađan Mihajlović <32955957+mladjanm@users.noreply.github.com>
1 parent abfea1e commit d653ffb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/openapi-to-graphql/test/example_api8_server.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ function startServer(PORT) {
5959
})
6060

6161
app.post('/api/type', (req, res) => {
62-
if (req.body?.type?.name && !Types[req.body.type.name]) {
62+
if (
63+
req.body &&
64+
req.body.type &&
65+
req.body.type.name &&
66+
!Types[req.body.type.name]
67+
) {
6368
Types[req.body.type.name] = req.body.type
6469
}
6570

0 commit comments

Comments
 (0)