mirror of
https://github.com/4ian/GDevelop.git
synced 2026-10-12 02:01:17 +00:00
Review changes
This commit is contained in:
+12
@@ -152,6 +152,18 @@ export const handleAutocompletionsKeyDown = (
|
||||
if (autocompletion.isExact) return state;
|
||||
onInsertAutocompletion(autocompletion);
|
||||
|
||||
// Stop propagation to avoid closing the modal the
|
||||
// field is contained in.
|
||||
event.stopPropagation();
|
||||
} else {
|
||||
const additionalAction =
|
||||
state.additionalActions[
|
||||
state.selectedCompletionIndex - state.autocompletions.length
|
||||
];
|
||||
if (additionalAction) {
|
||||
additionalAction.onClick();
|
||||
}
|
||||
|
||||
// Stop propagation to avoid closing the modal the
|
||||
// field is contained in.
|
||||
event.stopPropagation();
|
||||
|
||||
@@ -499,7 +499,7 @@ export default class ExpressionField extends React.Component<Props, State> {
|
||||
onGetAdditionalAutocompletions,
|
||||
onExtractAdditionalErrors,
|
||||
} = this.props;
|
||||
if (!project || !instruction) return null;
|
||||
if (!project) return null;
|
||||
|
||||
const expression = this.state.validatedValue;
|
||||
|
||||
@@ -509,11 +509,13 @@ export default class ExpressionField extends React.Component<Props, State> {
|
||||
const parser = new gd.ExpressionParser2();
|
||||
const expressionNode = parser.parseExpression(expression).get();
|
||||
|
||||
const objectName = gd.InstructionValidator.getObjectNameForParameter(
|
||||
projectScopedContainersAccessor.get(),
|
||||
instruction,
|
||||
expressionType
|
||||
);
|
||||
const objectName = instruction
|
||||
? gd.InstructionValidator.getObjectNameForParameter(
|
||||
projectScopedContainersAccessor.get(),
|
||||
instruction,
|
||||
expressionType
|
||||
)
|
||||
: '';
|
||||
|
||||
const showDeprecatedInstructionWarning = this.context
|
||||
? this.context.values.showDeprecatedInstructionWarning
|
||||
|
||||
Reference in New Issue
Block a user