fix: ensures querying with drafts works on both published and non-published posts

This commit is contained in:
James
2023-01-12 10:06:44 -05:00
parent 69026c5779
commit f018fc04b0

View File

@@ -154,8 +154,8 @@ export const mergeDrafts = async <T extends TypeWithID>({
finalQueryToBuild.where.and.push(accessResult);
}
if (where) {
finalQueryToBuild.where.and[0].or.push(where);
if (incomingWhere) {
finalQueryToBuild.where.and[0].or.push(incomingWhere);
}
if (includedParentIDs.length > 0) {