Skip to content

Commit 097267a

Browse files
committed
```
A = Model.findOne({ where: { attr1: "1", attr2: "2" }, include: [] }); B = Model.findOne({ where: { attr1: "1", attr2: "2" }, include: undefined }; ``` Expect: A = B Actual: A ignores the where clause and B doesn't.
1 parent fe489ec commit 097267a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/services/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function inferAlias(options: any, source: any): any {
249249
options.include = [options.include];
250250
} else if (!options.include.length) {
251251
delete options.include;
252-
return;
252+
return options;
253253
}
254254

255255
// convert all included elements to { model: Model } form

0 commit comments

Comments
 (0)