mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
Fix get sum data error when field has ( and comma, fix #302
This commit is contained in:
parent
6c6654a3db
commit
4498024eac
@ -454,7 +454,7 @@ export default class extends Base {
|
||||
options.limit = 1;
|
||||
}
|
||||
let data = await this.db().select(options);
|
||||
let multi = field.indexOf(',') > -1;
|
||||
let multi = field.indexOf(',') > -1 && field.indexOf('(') === -1;
|
||||
if (multi) {
|
||||
let fields = field.split(/\s*,\s*/);
|
||||
let result = {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user