Skip to content

Commit

Permalink
#2717 Add types
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinEpam23 committed May 31, 2023
1 parent e4fad42 commit b3511e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/ketcher-core/src/domain/entities/sgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const InfoPanel: FC<InfoPanelProps> = (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)
Expand Down

0 comments on commit b3511e8

Please sign in to comment.