We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 236f394 commit fbdc7b0Copy full SHA for fbdc7b0
server/__tests__/utils/fakes.js
@@ -55,8 +55,13 @@ function createFakeStrapi({
55
return [{ id: 1 }]
56
})
57
58
+ const fakeFindOne = jest.fn(() => {
59
+ return [{ id: 1 }]
60
+ })
61
+
62
const fakeEntityService = {
63
findMany: fakeFindMany,
64
+ findOne: fakeFindOne,
65
}
66
67
const fakeStrapi = {
server/services/content-types/content-types.js
@@ -145,7 +145,7 @@ module.exports = ({ strapi }) => ({
145
strapi.log.error(`Could not find entry with id ${id} in ${contentType}`)
146
147
148
- return entry
+ return entry || {}
149
},
150
151
/**
0 commit comments