Skip to content

Commit dd1396f

Browse files
authored
Merge pull request #67 from marshallswain/fix/individual-requests-ignore-keyHere-keyThere
fix: rm assert keyHere/keyThere for individual includes
2 parents 1da54c7 + cd9bc57 commit dd1396f

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/utils/shallow-populate.utils.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,6 @@ export const assertIncludes = (includes: PopulateObject[]): void => {
7979
'shallowPopulate hook: Every `include` with attribute `keyHere` or `keyThere` also needs the other attribute defined',
8080
)
8181
}
82-
83-
if (
84-
include.requestPerItem &&
85-
('keyHere' in include || 'keyThere' in include)
86-
) {
87-
throw new Error(
88-
'shallowPopulate hook: The attributes `keyHere` and `keyThere` are useless when you set `requestPerItem: true`. You should remove these properties',
89-
)
90-
}
9182
}
9283

9384
const uniqueNameAs = _uniqBy(includes, 'nameAs')

0 commit comments

Comments
 (0)