Skip to content

Commit 9f0d6a3

Browse files
committed
requite models to be objects
1 parent 51738cb commit 9f0d6a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const models = {};
22

33
function model(data, modelName) {
4-
if(!data || (!this.modelName && !modelName)) {
4+
if(!data || (!this.modelName && !modelName) || typeof data !== 'object') {
55
return this;
66
}
77

0 commit comments

Comments
 (0)