Skip to content

Commit ba6bbf0

Browse files
committed
Ensure modelate data is an object
1 parent c42d93e commit ba6bbf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modelate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const validate = require('./validate').check;
1111
* @param opts {Object} Options for the modelate.
1212
*/
1313
function modelate(data, opts) {
14-
if ((!this.modelName && opts && !opts.model) || !data) {
14+
if ((!this.modelName && opts && !opts.model) || !data || typeof data !== 'object') {
1515
return {};
1616
}
1717

0 commit comments

Comments
 (0)