Skip to content

fix(mobile): prevent crash from null shortcut data - #757

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/null-shortcut-data-crash
Open

fix(mobile): prevent crash from null shortcut data#757
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/null-shortcut-data-crash

Conversation

@sentry

@sentry sentry Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

This PR addresses the TypeError: Cannot read property 'originId' of null that occurred when openHomeScreenShortcut was called with a shortcut item where item.data was null.

The original guard if (!item) return was insufficient, as it did not account for cases where the item itself was present but its data property was null. This led to a crash during background or shortcut launches when the OS delivered such an item.

The fix extends the guard to if (!item || !item.data) return, ensuring that the function safely returns early if either the item or its data payload is missing, thus preventing the null dereference.

Fixes BETTER-RAIL-49

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 9982ddc1-545e-47c3-8a1d-d703e5f6861d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

0 participants