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