From 2e4cd4dd392d2e6507c5ba6d2e847cd58c72815e Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 2 Feb 2021 00:43:23 -0600 Subject: [PATCH] refactor: simple --- .../entity/src/behavior-components/expression.jsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/entity/src/behavior-components/expression.jsx b/packages/entity/src/behavior-components/expression.jsx index eb41578..05c32b4 100644 --- a/packages/entity/src/behavior-components/expression.jsx +++ b/packages/entity/src/behavior-components/expression.jsx @@ -304,14 +304,9 @@ const Expression = ({ ); } } - let realType; - if (isKey(lastOp)) { - realType = description.args - ? 'function' - : description.type; - } - if (isInvocation(lastOp)) { - realType = description.type; + let realType = description.type; + if (isKey(lastOp) && description.args) { + realType = 'function'; } if (expressionValue) { realType = 'undefined' === description.type ? 'undefined' : 'void';