collection fix

This commit is contained in:
Yuri Kuznetsov
2020-04-15 13:57:46 +03:00
parent 9bbe2ba80d
commit f28fcde90c

View File

@@ -147,13 +147,17 @@ define('collection', [], function () {
this.where = options.where || this.where;
var length = this.length + this.lengthCorrection;
if (!('maxSize' in options)) {
options.data.maxSize = options.more ? this.maxSize : ((this.length > this.maxSize) ? this.length : this.maxSize);
options.data.maxSize = options.more ? this.maxSize : (
(length > this.maxSize) ? length : this.maxSize
);
} else {
options.data.maxSize = options.maxSize;
}
options.data.offset = options.more ? this.length + this.lengthCorrection : this.offset;
options.data.offset = options.more ? length : this.offset;
options.data.orderBy = this.orderBy;
options.data.order = this.order;
options.data.where = this.getWhere();