diff --git a/packages/ketcher-core/src/domain/entities/sgroup.ts b/packages/ketcher-core/src/domain/entities/sgroup.ts index eab98aa0c6..d1c5c57e89 100644 --- a/packages/ketcher-core/src/domain/entities/sgroup.ts +++ b/packages/ketcher-core/src/domain/entities/sgroup.ts @@ -628,14 +628,14 @@ export class SGroup { }) } - static isSuperAtom(sGroup) { + static isSuperAtom(sGroup: SGroup): boolean { if (!sGroup) { return false } return sGroup.type === SGroup.TYPES.SUP } - static isDataSGroup(sGroup) { + static isDataSGroup(sGroup: SGroup): boolean { if (!sGroup) { return false } diff --git a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx index 18657214a3..93bc2a7408 100644 --- a/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx +++ b/packages/ketcher-react/src/script/ui/views/components/StructEditor/InfoPanel.tsx @@ -95,7 +95,7 @@ const InfoPanel: FC = (props) => { const groupName = sGroup?.data?.name useEffect(() => { - if (SGroup.isDataSGroup(sGroup)) { + if (sGroup && SGroup.isDataSGroup(sGroup)) { setSGroupData(`${sGroup.data?.fieldName}=${sGroup.data?.fieldValue}`) } else { setSGroupData(null)