diff --git a/packages/entity/src/behavior-components/expression.jsx b/packages/entity/src/behavior-components/expression.jsx index a620c18..d507095 100644 --- a/packages/entity/src/behavior-components/expression.jsx +++ b/packages/entity/src/behavior-components/expression.jsx @@ -72,7 +72,12 @@ const Expression = ({ : {} ), ...( - vararg || (isLast && !isFirst) + vararg && isFirst + ? {'...': {label: '', type: description.type}} + : {} + ), + ...( + isLast && !isFirst ? {'.': {label: '', type: description.type}} : {} ), @@ -90,11 +95,11 @@ const Expression = ({ }} key={opPath} onChange={((i) => (event, value, localPath) => { - if ('.' === value) { + if (0 === value.indexOf('.')) { const parts = localPath.split('/'); parts.pop(); parts.pop(); - if (vararg) { + if ('...' === value) { parts.pop(); patch({ op: 'remove', diff --git a/packages/entity/src/behavior-components/expression/invocation.jsx b/packages/entity/src/behavior-components/expression/invocation.jsx index 0c599d0..ca08104 100644 --- a/packages/entity/src/behavior-components/expression/invocation.jsx +++ b/packages/entity/src/behavior-components/expression/invocation.jsx @@ -20,7 +20,7 @@ const Invocation = ({ return ( ); }