Skip to content

Commit d7cfce3

Browse files
committed
fix: return {} instead of null
1 parent 95f30b7 commit d7cfce3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/baseController.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ class Controller {
110110
// cosntruct attributes clause based on
111111
generateAttributesClause (req) {
112112
const { fields } = req.query
113-
if (!fields) return null
113+
if (!fields) return {}
114114
if(!fields[this._type]) {
115-
return null
115+
return {}
116116
}
117117

118118
return fields[this._type].split(',')

0 commit comments

Comments
 (0)