From 6424c8b2e04f3e983043aee72dcd52ce621cce90 Mon Sep 17 00:00:00 2001 From: Michael McKinley Date: Fri, 1 Jul 2016 11:19:55 -0700 Subject: [PATCH] Remove CUIICatalog invalid asset name supplied error Summary: Thanks for submitting a pull request! Please provide enough information so that others can review your pull request: (You can skip this if you're fixing a typo or adding an app to the Showcase.) Explain the **motivation** for making this change. What existing problem does the pull request solve? Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. **Test plan (required)** Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. Make sure tests pass on both Travis and Circle CI. **Code formatting** Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide). For more info, see the ["Pull Requests" section of our "Contributing" guidelines](https://github.com/facebook/react-native/blob/mas Closes https://github.com/facebook/react-native/pull/7535 Differential Revision: D3509757 fbshipit-source-id: 70ff6c9c137c766ccb1173921f08571f48cb4f0b --- React/Base/RCTConvert.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTConvert.m b/React/Base/RCTConvert.m index 754762e6dba..d2d3b457877 100644 --- a/React/Base/RCTConvert.m +++ b/React/Base/RCTConvert.m @@ -900,7 +900,7 @@ RCT_ENUM_CONVERTER(RCTAnimationType, (@{ NSString *scheme = URL.scheme.lowercaseString; if ([scheme isEqualToString:@"file"]) { NSString *assetName = RCTBundlePathForURL(URL); - image = [UIImage imageNamed:assetName]; + image = assetName ? [UIImage imageNamed:assetName] : nil; if (!image) { // Attempt to load from the file system NSString *filePath = URL.path;