编译entity/entityId所指向的对象的filter中的一个笔误
This commit is contained in:
parent
d05daf766d
commit
e43caa8af6
|
|
@ -789,7 +789,7 @@ var TreeStore = /** @class */ (function (_super) {
|
|||
if (obscurePass(row, 'entity', option) || obscurePass(row, 'entityId', option)) {
|
||||
return [2 /*return*/, true];
|
||||
}
|
||||
if (row.entity !== attr || row.entityId) {
|
||||
if (row.entity !== attr || !row.entityId) {
|
||||
return [2 /*return*/, false];
|
||||
}
|
||||
node2 = (0, lodash_1.get)(this.store, "".concat(attr, ".").concat(row.entityId));
|
||||
|
|
@ -1102,6 +1102,7 @@ var TreeStore = /** @class */ (function (_super) {
|
|||
case 1:
|
||||
{
|
||||
id = data.id;
|
||||
(0, assert_1.assert)(id);
|
||||
// const node = this.store[entity] && (this.store[entity]!)[id as string];
|
||||
// const row = node && this.constructRow(node, context) || {};
|
||||
/* if (row) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"test": "cross-env TS_NODE_PROJECT='tsconfig.mocha.json' mocha",
|
||||
"build": "tsc"
|
||||
},
|
||||
"main": "lib/index",
|
||||
"main": "src/index",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.12.13",
|
||||
"@babel/core": "^7.12.13",
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict, Cxt exten
|
|||
if (obscurePass(row, 'entity', option) || obscurePass(row, 'entityId', option)) {
|
||||
return true;
|
||||
}
|
||||
if ((row as any).entity !== attr || (row as any).entityId) {
|
||||
if ((row as any).entity !== attr || !(row as any).entityId) {
|
||||
return false;
|
||||
}
|
||||
const node2 = get(this.store, `${attr}.${(row as any).entityId}`);
|
||||
|
|
@ -801,6 +801,7 @@ export default class TreeStore<ED extends EntityDict & BaseEntityDict, Cxt exten
|
|||
switch (action) {
|
||||
case 'create': {
|
||||
const { id } = data as DeduceCreateOperationData<ED[T]["Schema"]>;
|
||||
assert(id);
|
||||
// const node = this.store[entity] && (this.store[entity]!)[id as string];
|
||||
// const row = node && this.constructRow(node, context) || {};
|
||||
/* if (row) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue