注释了一个assert的边界
This commit is contained in:
parent
36c1eb9d18
commit
745d7c6452
|
|
@ -750,7 +750,8 @@ export default class TreeStore extends CascadeStore {
|
|||
}
|
||||
if (row[`${attr}Id`] === undefined) {
|
||||
// 说明一对多的外键没有取出来,需要抛出RowUnexists异常
|
||||
assert(typeof projection[attr] === 'object');
|
||||
// 这个assert在count的情况下不满足 by Xc 20240205
|
||||
// assert(typeof projection[attr] === 'object');
|
||||
if (option?.ignoreAttrMiss) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn(`对象${entity}上的${attr}Id不能确定值,可能会影响判定结果`);
|
||||
|
|
|
|||
|
|
@ -752,7 +752,8 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
}
|
||||
if (row[`${attr}Id`] === undefined) {
|
||||
// 说明一对多的外键没有取出来,需要抛出RowUnexists异常
|
||||
(0, assert_1.assert)(typeof projection[attr] === 'object');
|
||||
// 这个assert在count的情况下不满足 by Xc 20240205
|
||||
// assert(typeof projection[attr] === 'object');
|
||||
if (option?.ignoreAttrMiss) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn(`对象${entity}上的${attr}Id不能确定值,可能会影响判定结果`);
|
||||
|
|
|
|||
|
|
@ -926,7 +926,8 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict> extends C
|
|||
}
|
||||
if ((row as any)[`${attr}Id`] === undefined) {
|
||||
// 说明一对多的外键没有取出来,需要抛出RowUnexists异常
|
||||
assert(typeof projection[attr] === 'object');
|
||||
// 这个assert在count的情况下不满足 by Xc 20240205
|
||||
// assert(typeof projection[attr] === 'object');
|
||||
if (option?.ignoreAttrMiss) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.warn(`对象${entity as string}上的${attr}Id不能确定值,可能会影响判定结果`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue