Skip to content

Commit ca7361d

Browse files
authored
Throw error when no callback (#1990)
1 parent 8f5ea5d commit ca7361d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/40select.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ yy.Select = class Select {
344344
// the (data, err) standard is maintained here.
345345
var res1 = queryfn(query, oldscope, function (res, err) {
346346
if (err) {
347-
return cb(null, err);
347+
if (cb) {
348+
return cb(null, err);
349+
}
350+
throw err;
348351
}
349352
if (query.rownums.length > 0) {
350353
for (var i = 0, ilen = res.length; i < ilen; i++) {

0 commit comments

Comments
 (0)