Skip to content

Commit c84bc0d

Browse files
committed
Check if dialect was initialized
1 parent 1a1a135 commit c84bc0d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,15 @@ module.exports = function (schemaName, schema, config) {
13231323
}
13241324
criteria = _.extend({}, criteria)
13251325
criteria.where = where
1326+
if (!sv) {
1327+
throw new Error({
1328+
type: 'InvalidData',
1329+
message:
1330+
'Entity ' +
1331+
data.key +
1332+
' has no dialect defined'
1333+
})
1334+
}
13261335
var view = sv.build(
13271336
data.adapter.buildQuery(entity, options),
13281337
criteria

0 commit comments

Comments
 (0)