Skip to content

Commit eaf7941

Browse files
committed
handle empty req
1 parent 6fda81c commit eaf7941

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/baseController.js

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ class Controller {
134134
}
135135

136136
generateRelationshipWhereClause (req, modelName) {
137+
if (!req) return {}
137138
const { filterRelationships } = req.query
138139

139140
if (filterRelationships && filterRelationships[modelName]) return filterRelationships[modelName]

0 commit comments

Comments
 (0)