create时容了没有entity子树的错
This commit is contained in:
parent
4c7c6c7635
commit
4ec6fa550c
|
|
@ -622,7 +622,7 @@ class TreeStore extends CascadeStore_1.CascadeStore {
|
|||
switch (action) {
|
||||
case 'create': {
|
||||
const { id } = data;
|
||||
const node = (this.store[entity])[id];
|
||||
const node = this.store[entity] && (this.store[entity])[id];
|
||||
const row = node && this.constructRow(node, context) || {};
|
||||
/* if (row) {
|
||||
throw new OakError(RowStore.$$LEVEL, RowStore.$$CODES.primaryKeyConfilict);
|
||||
|
|
|
|||
|
|
@ -771,7 +771,7 @@ export default class TreeStore<ED extends {
|
|||
switch (action) {
|
||||
case 'create': {
|
||||
const { id } = data as DeduceCreateOperationData<ED[T]["Schema"]>;
|
||||
const node = (this.store[entity]!)[id as string];
|
||||
const node = this.store[entity] && (this.store[entity]!)[id as string];
|
||||
const row = node && this.constructRow(node, context) || {};
|
||||
/* if (row) {
|
||||
throw new OakError(RowStore.$$LEVEL, RowStore.$$CODES.primaryKeyConfilict);
|
||||
|
|
|
|||
Loading…
Reference in New Issue