Skip to content

[BUG]: skeletalSense.analyze() crashes with TypeError when nose landmark (index 0) is missing/undefined#992

Open
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/937-skeletalsense-nose-crash
Open

[BUG]: skeletalSense.analyze() crashes with TypeError when nose landmark (index 0) is missing/undefined#992
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/937-skeletalsense-nose-crash

Conversation

@vipul674

Copy link
Copy Markdown

Description

skeletalSense.analyze() at line 172 accesses landmarks[0].y without checking if landmarks[0] exists. When MediaPipe fails to detect the nose landmark (common during partial occlusions), this throws TypeError: Cannot read properties of undefined.

Fix

Added null guard (landmarks[0] &&) before the conditional accessing landmarks[0].y.

Changes

  • src/services/skeletalSense.ts: One-line fix adding null check

Closes #937

landmarks[0] (nose) accessed without null check — throws TypeError when
landmark is missing/undefined during pose detection gaps.

Closes Somil450#937
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@vipul674 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vipul674

Copy link
Copy Markdown
Author

@Somil450 Please review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: skeletalSense.analyze() crashes with TypeError when nose landmark (index 0) is missing/undefined

1 participant