Lawrence Cheuk 4fd0442482 fix: fixed android flash crash when subtitle =' ' (empty string) (#469)
reference: https://github.com/wix/react-native-navigation/issues/2892
in short, javascript  A && B syntax will return A if A is false. if A is empty string, it will return empty string (which is false if evaluated as boolean) this most of the time works but not here. {A && `<Text>sth</Text>`}, will return "" when A is empty string. This have no problem in iPhone, but returning an empty string to rn component other that` <Text> `will crash in android. The fatal error message can only be viewed using android device monitor or logcat, no message will show in console (as it is a flash crash).
To reproduce, put an empty string in subtitle. the double !! first turn empty string '' to true and then false. return false or null is save within JSX



07-26 21:07:41.735: E/AndroidRuntime(16154): java.lang.RuntimeException: abi26_0_0.com.facebook.react.uimanager.IllegalViewOperationException: Trying to add unknown view tag: 1472
07-26 21:07:41.735: E/AndroidRuntime(16154):  detail: View tag:1479
07-26 21:07:41.735: E/AndroidRuntime(16154):   children(2): [
07-26 21:07:41.735: E/AndroidRuntime(16154): 1468,1470,
07-26 21:07:41.735: E/AndroidRuntime(16154):  ],
07-26 21:07:41.735: E/AndroidRuntime(16154):   viewsToAdd(1): [
07-26 21:07:41.735: E/AndroidRuntime(16154): [2,1472],
07-26 21:07:41.735: E/AndroidRuntime(16154):  ],
07-26 21:07:41.735: E/AndroidRuntime(16154): 	at abi26_0_0.com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:313)
07-26 21:07:41.735: E/AndroidRuntime(16154): 	at abi26_0_0.com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:33)

<!-- Please provide enough information so that others can review your pull request. -->
<!-- Keep pull requests small and focused on a single change. -->

### Motivation

<!-- What existing problem does the pull request solve? Can you solve the issue with a different approach? -->

### Test plan

<!-- List the steps with which we can test this change. Provide screenshots if this changes anything visual. -->
2018-09-01 12:57:07 +02:00
2018-02-26 12:40:25 +01:00
2018-09-01 00:31:40 +02:00
2018-03-02 22:18:45 +01:00
2016-10-23 23:36:39 +05:30
2018-05-31 07:44:55 +02:00
2018-02-23 12:27:36 +01:00
2018-07-25 15:04:01 +02:00
2018-06-28 13:05:21 +02:00

react-native-paper

Material design for React Native.


Build Status Version MIT License PRs Welcome Chat

Features

Currently supported React Native version: >= 0.50.3

Try it out

Run the example app with Expo to see it in action.

The source code for the examples are under the /example folder.

Getting Started

Refer to the getting started guide for instructions.

Documentation

Check the components and their usage in our documentation.

Contributing

Read the contribution guidelines before contributing.

Description
No description provided
Readme 62 MiB
Languages
TypeScript 90.7%
JavaScript 8.5%
Shell 0.4%
CSS 0.3%