check for rootId
This commit is contained in:
parent
5306b11157
commit
d8e3e73def
@ -966,7 +966,7 @@ export default {
|
|||||||
return me?.id === item.userId
|
return me?.id === item.userId
|
||||||
},
|
},
|
||||||
root: async (item, args, { models }) => {
|
root: async (item, args, { models }) => {
|
||||||
if (!item.parentId) {
|
if (!item.rootId) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return await models.item.findUnique({ where: { id: item.rootId } })
|
return await models.item.findUnique({ where: { id: item.rootId } })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user