fix: strip property def from assign

This commit is contained in:
cha0s 2020-06-25 10:05:46 -05:00
parent d8a906ef7c
commit aa8e23f8b3

View File

@ -69,8 +69,10 @@ const Expression = (props) => {
}, event); }, event);
return; return;
} }
const opsDescription = descriptionFromOps(context, finalOps); const {
const {defaultLiteral} = opsDescription; defaultLiteral,
type: descriptionType,
} = descriptionFromOps(context, finalOps);
onChange({ onChange({
...value, ...value,
ops: finalOps, ops: finalOps,
@ -81,7 +83,7 @@ const Expression = (props) => {
} }
: { : {
type: 'expression', type: 'expression',
ops: defaultOps(context, opsDescription.type), ops: defaultOps(context, descriptionType),
}, },
}, event); }, event);
}} }}
@ -163,7 +165,7 @@ const Expression = (props) => {
}, event) }, event)
)} )}
options={opsDescription.options} options={opsDescription.options}
type={opsDescription.type} type={opsDescription.type.split('|').filter((part) => 'property' !== part).join('|')}
value={assign} value={assign}
/> />
</span> </span>