Skip to content

Commit c42d93e

Browse files
committed
Fix model no data parsed
1 parent 30ef9ff commit c42d93e

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) {
14+
if ((!this.modelName && opts && !opts.model) || !data) {
1515
return {};
1616
}
1717

0 commit comments

Comments
 (0)