Skip to content

Fix crash in RNTester when removing/developing tests#23406

Closed
berickson1 wants to merge 1 commit intofacebook:masterfrom
berickson1:patch-2
Closed

Fix crash in RNTester when removing/developing tests#23406
berickson1 wants to merge 1 commit intofacebook:masterfrom
berickson1:patch-2

Conversation

@berickson1
Copy link
Copy Markdown
Contributor

Ensure that the current openExample (stored in AsyncStorage) exists in the module list.

Summary

It's possible for the example to be missing if a test was removed & previously open in RNTester OR when actively developing RNTester tests & switching between branches

Changelog

[General] [Fixed] - Potential crash in RNTester when removing/developing test cases

Test Plan

  1. Create a new RNTester test file
  2. Open it in the app
  3. Remove the previously added RNTester test
  4. Re-open RNTester app (expect no crash/exception)

Ensure that the current openExample (stored in AsyncStorage) exists in the module list.
It's possible for the example to be missing if a test was removed & previously open in RNTester OR when actively developing RNTester tests & switching between branches
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner labels Feb 12, 2019
Copy link
Copy Markdown
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 12, 2019
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Copy Markdown
Collaborator

@berickson1 merged commit da6a265 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 12, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 12, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 14, 2019
@berickson1 berickson1 deleted the patch-2 branch May 6, 2019 17:34
rozele pushed a commit to microsoft/react-native-windows that referenced this pull request Jul 18, 2019
Summary:
Ensure that the current openExample (stored in AsyncStorage) exists in the module list.

It's possible for the example to be missing if a test was removed & previously open in RNTester OR when actively developing RNTester tests & switching between branches

[General] [Fixed] - Potential crash in RNTester when removing/developing test cases
Pull Request resolved: facebook/react-native#23406

Differential Revision: D14055695

Pulled By: cpojer

fbshipit-source-id: 6cf00e097e934f7a342e7d210b6319e1cba142ca
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Microsoft Partner: Microsoft Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants