Fix: RTE crash on defaultText change (#6789)
This commit is contained in:
parent
8099a50832
commit
aca4457a32
|
|
@ -381,24 +381,31 @@ class CodeEditor extends Component<Props, State> {
|
|||
const entityInformation: FieldEntityInformation = {
|
||||
expectedType: expected?.autocompleteDataType,
|
||||
};
|
||||
|
||||
if (dataTreePath) {
|
||||
const { entityName, propertyPath } = getEntityNameAndPropertyPath(
|
||||
dataTreePath,
|
||||
);
|
||||
entityInformation.entityName = entityName;
|
||||
const entity = dynamicData[entityName];
|
||||
if (entity && "ENTITY_TYPE" in entity) {
|
||||
const entityType = entity.ENTITY_TYPE;
|
||||
if (
|
||||
entityType === ENTITY_TYPE.WIDGET ||
|
||||
entityType === ENTITY_TYPE.ACTION
|
||||
) {
|
||||
entityInformation.entityType = entityType;
|
||||
|
||||
if (entity) {
|
||||
if ("ENTITY_TYPE" in entity) {
|
||||
const entityType = entity.ENTITY_TYPE;
|
||||
if (
|
||||
entityType === ENTITY_TYPE.WIDGET ||
|
||||
entityType === ENTITY_TYPE.ACTION
|
||||
) {
|
||||
entityInformation.entityType = entityType;
|
||||
}
|
||||
}
|
||||
|
||||
if (isActionEntity(entity))
|
||||
entityInformation.entityId = entity.actionId;
|
||||
if (isWidgetEntity(entity))
|
||||
entityInformation.entityId = entity.widgetId;
|
||||
entityInformation.propertyPath = propertyPath;
|
||||
}
|
||||
if (isActionEntity(entity)) entityInformation.entityId = entity.actionId;
|
||||
if (isWidgetEntity(entity)) entityInformation.entityId = entity.widgetId;
|
||||
entityInformation.propertyPath = propertyPath;
|
||||
}
|
||||
return entityInformation;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user