Skip to content

Commit

Permalink
fix(designable-antd): rename operationNpde to operationNode (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkmice authored Jun 29, 2021
1 parent acec46f commit 97577b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions designable/antd/src/components/DesignableArrayTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export const DesignableArrayTable: React.FC<TableProps<any>> = observer(
{
title: 'addTableColumn',
onClick: () => {
const operationNpde = findNodeByComponentPath(node, [
const operationNode = findNodeByComponentPath(node, [
'ArrayTable',
'*',
'ArrayTable.Column',
Expand All @@ -319,8 +319,8 @@ export const DesignableArrayTable: React.FC<TableProps<any>> = observer(
},
},
})
if (operationNpde) {
operationNpde.parent.insertBefore(tableColumn)
if (operationNode) {
operationNode.parent.insertBefore(tableColumn)
} else {
ensureObjectItemsNode(node).appendNode(tableColumn)
}
Expand Down

0 comments on commit 97577b5

Please sign in to comment.